2024-10-29 05:51:07 +00:00
|
|
|
FROM python:3.10.10-buster
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y bash gettext poppler-utils ffmpeg libsm6 libxext6 wget
|
|
|
|
|
2023-11-30 11:19:06 +00:00
|
|
|
RUN yes | apt install postgresql gcc musl-dev
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
RUN pip install uvicorn gunicorn Celery
|
|
|
|
|
2024-01-31 03:00:18 +00:00
|
|
|
# For intergration with sdskvu
|
2024-10-29 05:51:07 +00:00
|
|
|
COPY torch-1.13.1+cu116-cp310-cp310-linux_x86_64.whl .
|
2024-10-29 06:20:30 +00:00
|
|
|
RUN pip install torch-1.13.1+cu116-cp310-cp310-linux_x86_64.whl
|
2024-01-31 03:00:18 +00:00
|
|
|
RUN pip install -U openmim==0.3.7 --no-cache-dir
|
|
|
|
RUN mim install mmcv-full==1.7.2
|
2024-10-29 05:51:07 +00:00
|
|
|
COPY fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl .
|
2024-10-29 06:20:30 +00:00
|
|
|
RUN pip install fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl --no-cache-dir
|
2024-01-31 03:00:18 +00:00
|
|
|
# End intergration with sdskvu
|
|
|
|
|
2024-10-29 06:20:30 +00:00
|
|
|
COPY requirements.txt /app/
|
2024-10-29 05:51:07 +00:00
|
|
|
RUN pip install -r /app/requirements.txt --no-cache-dir
|
2023-12-13 09:01:31 +00:00
|
|
|
|
2024-10-29 05:51:07 +00:00
|
|
|
COPY fwd_api/utils/sdsvkvu ./sdsvkvu
|
|
|
|
RUN cd sdsvkvu/sdsvkvu/externals/sdsvocr/sdsvocr/externals/sdsv_dewarp && pip3 install -v -e . --no-cache-dir
|
|
|
|
RUN cd sdsvkvu/sdsvkvu/externals/sdsvocr/sdsvocr/externals/sdsvtd && pip3 install -v -e . --no-cache-dir
|
|
|
|
RUN cd sdsvkvu/sdsvkvu/externals/sdsvocr/sdsvocr/externals/sdsvtr && pip3 install -v -e . --no-cache-dir
|
|
|
|
RUN cd sdsvkvu && pip3 install -v -e . --no-cache-dir
|
2024-01-31 03:00:18 +00:00
|
|
|
|
|
|
|
# For intergration with sdskvu
|
2024-10-29 05:51:07 +00:00
|
|
|
COPY paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl .
|
|
|
|
RUN pip install /app/paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl --no-cache-dir
|
2024-01-31 03:00:18 +00:00
|
|
|
|
2024-10-29 05:51:07 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY --chown=${UID}:${GID} . /app
|
2023-12-13 09:01:31 +00:00
|
|
|
ENV TZ="Asia/Ho_Chi_Minh"
|
2024-01-31 03:00:18 +00:00
|
|
|
|
2024-10-29 05:51:07 +00:00
|
|
|
CMD ["bash"]
|