diff --git a/docker_PaddleOCR/paddle-ocr.Dockerfile b/docker_PaddleOCR/paddle-ocr.Dockerfile index c6bcfff..3211fd2 100644 --- a/docker_PaddleOCR/paddle-ocr.Dockerfile +++ b/docker_PaddleOCR/paddle-ocr.Dockerfile @@ -27,5 +27,9 @@ RUN set -eux && source /opt/utils/script-setup.sh \ && pip install -U --no-cache-dir paddleocr \ # Step 4. install PaddleOCR fixes for Python>=3.10 compatibility && pip uninstall -y attrdict && pip install -UI --no-cache-dir attrdict3 \ - # Step 5. cleanup + # Step 5. uninstall nvidia python packages if any + && echo "Try to uninstall nvidia python packages to reduce storage size..." \ + && pip freeze | grep -i '^nvidia-' | cut -d'=' -f1 | xargs -r pip uninstall -y \ + && apt-get -qq update --fix-missing && apt-get -qq install -y --no-install-recommends --allow-change-held-packages libcusparselt0 libnccl2 libnccl-dev \ + # Step 6. cleanup && install__clean && list_installed_packages diff --git a/docker_aidoc/miner.Dockerfile b/docker_aidoc/miner.Dockerfile index 395f26b..838a597 100644 --- a/docker_aidoc/miner.Dockerfile +++ b/docker_aidoc/miner.Dockerfile @@ -20,6 +20,10 @@ RUN set -eux \ libreoffice poppler-utils \ && pip install -U magic-pdf[full] modelscope \ # ---------- + && echo "Try to uninstall nvidia python packages to reduce storage size..." \ + && pip freeze | grep -i '^nvidia-' | cut -d'=' -f1 | xargs -r pip uninstall -y \ + && apt-get -qq update --fix-missing && apt-get -qq install -y --no-install-recommends --allow-change-held-packages libcusparselt0 libnccl2 libnccl-dev \ + # ---------- && rm -rf /var/lib/apt/lists/* \ && source /opt/utils/script-setup.sh \ && install__clean && list_installed_packages diff --git a/docker_vllm/vllm-cuda.Dockerfile b/docker_vllm/vllm-cuda.Dockerfile index df4fca9..195b669 100644 --- a/docker_vllm/vllm-cuda.Dockerfile +++ b/docker_vllm/vllm-cuda.Dockerfile @@ -14,6 +14,9 @@ RUN set -eux && source /opt/utils/script-setup.sh \ && echo "Detected CUDA version=${CUDA_VER} and IDX=${IDX}" \ # ----------------------------- && pip install vllm --index-url "https://download.pytorch.org/whl/${IDX}" --extra-index-url https://pypi.org/simple \ + && echo "Try to uninstall nvidia python packages to reduce storage size..." \ + && pip freeze | grep -i '^nvidia-' | cut -d'=' -f1 | xargs -r pip uninstall -y \ + && apt-get -qq update --fix-missing && apt-get -qq install -y --no-install-recommends --allow-change-held-packages libcusparselt0 libnccl2 libnccl-dev \ # && cd /tmp/ \ # && git clone https://github.com/vllm-project/vllm.git \ # && cd /tmp/vllm \