35 lines
1.4 KiB
Docker
Executable File
35 lines
1.4 KiB
Docker
Executable File
FROM python:3.10.10-buster
|
|
RUN apt-get update \
|
|
&& apt-get install -y bash gettext poppler-utils ffmpeg libsm6 libxext6 wget
|
|
|
|
RUN yes | apt install postgresql gcc musl-dev
|
|
RUN pip install --upgrade pip
|
|
RUN pip install uvicorn gunicorn Celery
|
|
|
|
# For intergration with sdskvu
|
|
COPY torch-1.13.1+cu116-cp310-cp310-linux_x86_64.whl .
|
|
RUN pip install torch-1.13.1+cu116-cp310-cp310-linux_x86_64.whl --no-cache-dir
|
|
RUN pip install -U openmim==0.3.7 --no-cache-dir
|
|
RUN mim install mmcv-full==1.7.2
|
|
COPY fastdeploy_gpu_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl .
|
|
RUN pip install fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl --no-cache-dir
|
|
# End intergration with sdskvu
|
|
|
|
COPY requirements.txt /app
|
|
RUN pip install -r /app/requirements.txt --no-cache-dir
|
|
|
|
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
|
|
|
|
# For intergration with sdskvu
|
|
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
|
|
|
|
WORKDIR /app
|
|
COPY --chown=${UID}:${GID} . /app
|
|
ENV TZ="Asia/Ho_Chi_Minh"
|
|
|
|
CMD ["bash"] |