From d5f8be12b85be78c7c031db93ff1fbe061365e9a Mon Sep 17 00:00:00 2001 From: dx-tan Date: Fri, 3 May 2024 08:45:28 +0700 Subject: [PATCH] Update Dockerfile, bypass pip issue --- cope2n-ai-fi/Dockerfile | 12 +++++++++--- cope2n-api/Dockerfile | 13 ++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/cope2n-ai-fi/Dockerfile b/cope2n-ai-fi/Dockerfile index 9c5d91c..c86986d 100755 --- a/cope2n-ai-fi/Dockerfile +++ b/cope2n-ai-fi/Dockerfile @@ -1,7 +1,7 @@ FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime RUN apt-get update && \ - apt-get install -y git gcc g++ ffmpeg libsm6 libxext6 && \ + apt-get install -y git gcc g++ ffmpeg libsm6 libxext6 wget && \ apt-get -y autoremove && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -16,10 +16,16 @@ RUN ln -s /opt/conda/lib/python3.10/site-packages/torch/lib/libcudnn.so.8 /usr/l ln -s /opt/conda/lib/libcublas.so /usr/lib/libcublas.so # RUN python -m pip install paddlepaddle-gpu==2.4.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html --no-cache-dir -RUN pip install fastdeploy-gpu-python==1.0.7 -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html --no-cache-dir +# RUN pip install fastdeploy-gpu-python==1.0.7 -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html --no-cache-dir +RUN wget https://bj.bcebos.com/fastdeploy/release/wheels/fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl \ + && pip install fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl --no-cache-dir \ + && rm fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl +RUN python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@a59f05630a8f205756064244bf5beb8661f96180' --no-cache-dir -RUN python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' --no-cache-dir +RUN wget https://paddle-wheel.bj.bcebos.com/2.4.2/linux/linux-gpu-cuda11.6-cudnn8.4.0-mkl-gcc8.2-avx/paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl \ + && pip install paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl --no-cache-dir \ + && rm paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl # Install SDSV packages COPY . /workspace/cope2n-ai-fi diff --git a/cope2n-api/Dockerfile b/cope2n-api/Dockerfile index bc603be..ed843a2 100755 --- a/cope2n-api/Dockerfile +++ b/cope2n-api/Dockerfile @@ -8,7 +8,7 @@ RUN groupadd --gid ${GID} ${USERNAME} \ && apt-get install -y sudo bash gettext poppler-utils \ && echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ && chmod 0440 /etc/sudoers.d/${USERNAME} -RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y +RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 wget -y RUN yes | apt install postgresql gcc musl-dev RUN pip install --upgrade pip RUN pip install uvicorn gunicorn Celery @@ -17,7 +17,10 @@ RUN pip install uvicorn gunicorn Celery RUN pip install pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 RUN pip install -U openmim==0.3.7 --no-cache-dir RUN mim install mmcv-full==1.7.2 -RUN pip install fastdeploy-gpu-python==1.0.7 -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html --no-cache-dir +# RUN pip install fastdeploy-gpu-python==1.0.7 -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html --no-cache-dir +RUN wget https://bj.bcebos.com/fastdeploy/release/wheels/fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl \ + && pip install fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl --no-cache-dir \ + && rm fastdeploy_python-1.0.7-cp310-cp310-manylinux1_x86_64.whl # End intergration with sdskvu USER ${UID} @@ -35,7 +38,11 @@ RUN cd /app/fwd_api/utils/sdsvkvu/sdsvkvu/externals/sdsvocr/externals/sdsvtr && RUN cd /app/fwd_api/utils/sdsvkvu && pip3 install -v -e . --no-cache-dir # For intergration with sdskvu -RUN python -m pip install paddlepaddle-gpu==2.4.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html --no-cache-dir +# RUN python -m pip install paddlepaddle-gpu==2.4.2.post116 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html --no-cache-dir +RUN wget https://paddle-wheel.bj.bcebos.com/2.4.2/linux/linux-gpu-cuda11.6-cudnn8.4.0-mkl-gcc8.2-avx/paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl \ + && pip install paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl --no-cache-dir \ + && rm paddlepaddle_gpu-2.4.2.post116-cp310-cp310-linux_x86_64.whl + ENV TZ="Asia/Ho_Chi_Minh"