File size: 646 Bytes
19ac67f
8799d1d
a6fe32c
fba32b8
 
 
 
a6fe32c
cff0bc8
 
 
 
8d827c4
 
8799d1d
2066bac
 
8d827c4
8799d1d
8d827c4
8799d1d
8d827c4
 
 
8799d1d
cff0bc8
 
7476c3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.10

RUN apt-get update && apt-get install -y libgl1-mesa-glx libxext6
RUN apt-get install -y pandoc
RUN apt-get install -y tesseract-ocr
RUN apt-get install -y tesseract-ocr-vie
RUN apt-get install -y tesseract-ocr-script-viet

RUN useradd -m -u 1000 user

USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

ENV X-FORWARDED-PROTO="https"

WORKDIR $HOME/app

COPY --chown=user  ./requirements.txt $HOME/app/requirements.txt

RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt

COPY --chown=user . $HOME/app

RUN mkdir nltk_data

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]