diff --git a/.github/workflows/mix-megaservice-test.yml b/.github/workflows/mix-megaservice-test.yml index 83c826cd7..3837a240b 100644 --- a/.github/workflows/mix-megaservice-test.yml +++ b/.github/workflows/mix-megaservice-test.yml @@ -68,7 +68,7 @@ jobs: - name: Install Dependencies run: | - docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /GenAIComps && pip install -r requirements.txt && python setup.py install" + docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /GenAIComps && pip install --no-cache-dir -r requirements.txt && python setup.py install" - name: Run UT run: | diff --git a/.github/workflows/scripts/codeScan/bandit.sh b/.github/workflows/scripts/codeScan/bandit.sh index aa5aa93a7..e356a965d 100644 --- a/.github/workflows/scripts/codeScan/bandit.sh +++ b/.github/workflows/scripts/codeScan/bandit.sh @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 source /GenAIComps/.github/workflows/scripts/change_color -pip install bandit==1.7.8 +pip install --no-cache-dir bandit==1.7.8 log_dir=/GenAIComps/.github/workflows/scripts/codeScan python -m bandit -r -lll -iii /GenAIComps > ${log_dir}/bandit.log exit_code=$? diff --git a/.github/workflows/scripts/freeze_requirements.sh b/.github/workflows/scripts/freeze_requirements.sh index 431dadaef..1b155bd1c 100644 --- a/.github/workflows/scripts/freeze_requirements.sh +++ b/.github/workflows/scripts/freeze_requirements.sh @@ -55,7 +55,7 @@ function check_branch_name() { function main() { check_branch_name - echo "::group::pip install pip-tools" && pip install pip-tools --upgrade && echo "::endgroup::" + echo "::group::pip install --no-cache-dir pip-tools" && pip install --no-cache-dir pip-tools --upgrade && echo "::endgroup::" export -f freeze find . -name "requirements.txt" | xargs -n 1 -I {} bash -c 'freeze "$@"' _ {} } diff --git a/comps/asr/Dockerfile b/comps/asr/Dockerfile index 58f20c03b..a07f341e9 100644 --- a/comps/asr/Dockerfile +++ b/comps/asr/Dockerfile @@ -15,7 +15,7 @@ COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ if [ "${ARCH}" = "cpu" ]; then \ - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ + pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/asr/requirements.txt ; \ else \ pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt ; \ @@ -25,4 +25,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user WORKDIR /home/user/comps/asr -ENTRYPOINT ["python", "asr.py"] \ No newline at end of file +ENTRYPOINT ["python", "asr.py"] diff --git a/comps/asr/whisper/Dockerfile b/comps/asr/whisper/Dockerfile index 5b50cf371..ece740bf6 100644 --- a/comps/asr/whisper/Dockerfile +++ b/comps/asr/whisper/Dockerfile @@ -23,7 +23,7 @@ USER user RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt && \ if [ "${ARCH}" = "cpu" ]; then \ - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ + pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/asr/requirements.txt ; \ else \ pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt ; \ diff --git a/comps/asr/whisper/Dockerfile_hpu b/comps/asr/whisper/Dockerfile_hpu index 15a14e0be..a5b9d11e9 100644 --- a/comps/asr/whisper/Dockerfile_hpu +++ b/comps/asr/whisper/Dockerfile_hpu @@ -25,7 +25,7 @@ USER user # Install requirements and optimum habana RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt && \ - pip install optimum[habana] + pip install --no-cache-dir optimum[habana] ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/milvus/docker/Dockerfile b/comps/dataprep/milvus/docker/Dockerfile index 7ce117641..708a4ab97 100644 --- a/comps/dataprep/milvus/docker/Dockerfile +++ b/comps/dataprep/milvus/docker/Dockerfile @@ -22,7 +22,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/milvus/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/pgvector/langchain/docker/Dockerfile b/comps/dataprep/pgvector/langchain/docker/Dockerfile index 897d15564..289829380 100644 --- a/comps/dataprep/pgvector/langchain/docker/Dockerfile +++ b/comps/dataprep/pgvector/langchain/docker/Dockerfile @@ -22,7 +22,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/pgvector/langchain/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/pinecone/docker/Dockerfile b/comps/dataprep/pinecone/docker/Dockerfile index 4bb51956b..078a5262b 100644 --- a/comps/dataprep/pinecone/docker/Dockerfile +++ b/comps/dataprep/pinecone/docker/Dockerfile @@ -26,7 +26,7 @@ RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/dataprep/pinecone/requirements.txt RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/pinecone/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/qdrant/docker/Dockerfile b/comps/dataprep/qdrant/docker/Dockerfile index f36b80bc9..77808c522 100644 --- a/comps/dataprep/qdrant/docker/Dockerfile +++ b/comps/dataprep/qdrant/docker/Dockerfile @@ -22,7 +22,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/qdrant/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/redis/langchain/docker/Dockerfile b/comps/dataprep/redis/langchain/docker/Dockerfile index 61620b88f..66b06dee3 100644 --- a/comps/dataprep/redis/langchain/docker/Dockerfile +++ b/comps/dataprep/redis/langchain/docker/Dockerfile @@ -25,7 +25,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/redis/langchain/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/redis/langchain_ray/docker/Dockerfile b/comps/dataprep/redis/langchain_ray/docker/Dockerfile index 3f6b10b61..3de8693a5 100644 --- a/comps/dataprep/redis/langchain_ray/docker/Dockerfile +++ b/comps/dataprep/redis/langchain_ray/docker/Dockerfile @@ -24,7 +24,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/redis/langchain_ray/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/redis/llama_index/docker/Dockerfile b/comps/dataprep/redis/llama_index/docker/Dockerfile index f34930e71..568fb9d6c 100644 --- a/comps/dataprep/redis/llama_index/docker/Dockerfile +++ b/comps/dataprep/redis/llama_index/docker/Dockerfile @@ -24,7 +24,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/redis/llama_index/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/dataprep/redis/multimodal_langchain/docker/Dockerfile b/comps/dataprep/redis/multimodal_langchain/docker/Dockerfile index a6c2be7e3..52650b7e1 100644 --- a/comps/dataprep/redis/multimodal_langchain/docker/Dockerfile +++ b/comps/dataprep/redis/multimodal_langchain/docker/Dockerfile @@ -26,7 +26,7 @@ RUN mkdir -p /home/user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip setuptools && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/dataprep/redis/multimodal_langchain/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/embeddings/langchain/docker/Dockerfile b/comps/embeddings/langchain/docker/Dockerfile index 365c73811..91bed1258 100644 --- a/comps/embeddings/langchain/docker/Dockerfile +++ b/comps/embeddings/langchain/docker/Dockerfile @@ -18,7 +18,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/embeddings/langchain/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/embeddings/multimodal_embeddings/bridgetower/docker/Dockerfile_hpu b/comps/embeddings/multimodal_embeddings/bridgetower/docker/Dockerfile_hpu index e571ab253..00aae7025 100644 --- a/comps/embeddings/multimodal_embeddings/bridgetower/docker/Dockerfile_hpu +++ b/comps/embeddings/multimodal_embeddings/bridgetower/docker/Dockerfile_hpu @@ -18,7 +18,7 @@ COPY --chown=user comps /home/user/comps # Install requirements and optimum habana RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/embeddings/multimodal_embeddings/multimodal_langchain/requirements.txt && \ - pip install optimum[habana] + pip install --no-cache-dir optimum[habana] ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/embeddings/multimodal_embeddings/multimodal_langchain/docker/Dockerfile b/comps/embeddings/multimodal_embeddings/multimodal_langchain/docker/Dockerfile index 97d5906ec..de11a9f7a 100644 --- a/comps/embeddings/multimodal_embeddings/multimodal_langchain/docker/Dockerfile +++ b/comps/embeddings/multimodal_embeddings/multimodal_langchain/docker/Dockerfile @@ -20,7 +20,7 @@ COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/embeddings/multimodal_embeddings/multimodal_langchain/requirements.txt -# RUN pip install --upgrade pydantic +# RUN pip install --no-cache-dir --upgrade pydantic ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/guardrails/llama_guard/docker/Dockerfile b/comps/guardrails/llama_guard/docker/Dockerfile index 491a4171f..c41d637b6 100644 --- a/comps/guardrails/llama_guard/docker/Dockerfile +++ b/comps/guardrails/llama_guard/docker/Dockerfile @@ -20,7 +20,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/guardrails/llama_guard/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/guardrails/pii_detection/pii/detect/keys_detection.py b/comps/guardrails/pii_detection/pii/detect/keys_detection.py index 796430a64..5427fa5bc 100755 --- a/comps/guardrails/pii_detection/pii/detect/keys_detection.py +++ b/comps/guardrails/pii_detection/pii/detect/keys_detection.py @@ -130,8 +130,8 @@ def detect_keys(content): try: from detect_secrets.core import scan except ImportError: - os.system("pip install detect-secrets") - os.system("pip install gibberish-detector") + os.system("pip install --no-cache-dir detect-secrets") + os.system("pip install --no-cache-dir gibberish-detector") from detect_secrets.settings import transient_settings diff --git a/comps/guardrails/pii_detection/pii/detect/phones_detection.py b/comps/guardrails/pii_detection/pii/detect/phones_detection.py index 0f6f770d3..9f8aec1a5 100644 --- a/comps/guardrails/pii_detection/pii/detect/phones_detection.py +++ b/comps/guardrails/pii_detection/pii/detect/phones_detection.py @@ -9,7 +9,7 @@ def detect_phones(text): try: import phonenumbers except ImportError: - os.system("pip install phonenumbers") + os.system("pip install --no-cache-dir phonenumbers") import phonenumbers matches = [] diff --git a/comps/guardrails/toxicity_detection/docker/Dockerfile b/comps/guardrails/toxicity_detection/docker/Dockerfile index 4a5d721f2..98dc0c053 100644 --- a/comps/guardrails/toxicity_detection/docker/Dockerfile +++ b/comps/guardrails/toxicity_detection/docker/Dockerfile @@ -21,7 +21,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/guardrails/toxicity_detection/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/llms/text-generation/native/docker/Dockerfile b/comps/llms/text-generation/native/docker/Dockerfile index f7d32cdb9..a619af65c 100644 --- a/comps/llms/text-generation/native/docker/Dockerfile +++ b/comps/llms/text-generation/native/docker/Dockerfile @@ -24,14 +24,14 @@ RUN git lfs install COPY comps /home/user/comps -RUN pip install --upgrade-strategy eager optimum[habana] && \ - pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.17.0 +RUN pip install --no-cache-dir --upgrade-strategy eager optimum[habana] && \ + pip install --no-cache-dir git+https://github.com/HabanaAI/DeepSpeed.git@1.17.0 RUN git clone ${REPO} /home/user/optimum-habana && \ cd /home/user/optimum-habana && git checkout ${REPO_VER} && \ - cd examples/text-generation && pip install -r requirements.txt && \ - cd /home/user/comps/llms/text-generation/native && pip install -r requirements.txt && \ - pip install --upgrade --force-reinstall pydantic + cd examples/text-generation && pip install --no-cache-dir -r requirements.txt && \ + cd /home/user/comps/llms/text-generation/native && pip install --no-cache-dir -r requirements.txt && \ + pip install --no-cache-dir --upgrade --force-reinstall pydantic ENV PYTHONPATH=/root:/home/user diff --git a/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray b/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray index 34105e2b0..5a15b24be 100644 --- a/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray +++ b/comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray @@ -11,11 +11,10 @@ WORKDIR /home/user/vllm-ray # copy the source code to the package directory COPY comps/llms/text-generation/vllm-ray /home/user/vllm-ray -RUN pip install --upgrade-strategy eager optimum[habana] && \ - pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.15.1 -# RUN pip install -v git+https://github.com/HabanaAI/vllm-fork.git@ae3d6121 -RUN pip install -v git+https://github.com/HabanaAI/vllm-fork.git@cf6952d -RUN pip install "ray>=2.10" "ray[serve,tune]>=2.10" +RUN pip install --no-cache-dir --upgrade-strategy eager optimum[habana] && \ + pip install --no-cache-dir git+https://github.com/HabanaAI/DeepSpeed.git@1.15.1 +RUN pip install --no-cache-dir -v git+https://github.com/HabanaAI/vllm-fork.git@cf6952d +RUN pip install --no-cache-dir "ray>=2.10" "ray[serve,tune]>=2.10" RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ service ssh restart diff --git a/comps/llms/text-generation/vllm/docker/Dockerfile.hpu b/comps/llms/text-generation/vllm/docker/Dockerfile.hpu index a1ab93a15..916c9a64c 100644 --- a/comps/llms/text-generation/vllm/docker/Dockerfile.hpu +++ b/comps/llms/text-generation/vllm/docker/Dockerfile.hpu @@ -13,11 +13,11 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/ USER user WORKDIR /root -RUN pip install --upgrade-strategy eager optimum[habana] +RUN pip install --no-cache-dir --upgrade-strategy eager optimum[habana] -RUN pip install -v git+https://github.com/HabanaAI/vllm-fork.git@cf6952d +RUN pip install --no-cache-dir -v git+https://github.com/HabanaAI/vllm-fork.git@cf6952d -RUN pip install setuptools +RUN pip install --no-cache-dir setuptools ENV no_proxy=localhost,127.0.0.1 diff --git a/comps/lvms/llava/Dockerfile_hpu b/comps/lvms/llava/Dockerfile_hpu index 58e69e043..a40189ee4 100644 --- a/comps/lvms/llava/Dockerfile_hpu +++ b/comps/lvms/llava/Dockerfile_hpu @@ -19,7 +19,7 @@ COPY comps /home/user/comps # Install requirements and optimum habana RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/lvms/requirements.txt && \ - pip install optimum[habana] + pip install --no-cache-dir optimum[habana] ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/reranks/fastrag/docker/Dockerfile b/comps/reranks/fastrag/docker/Dockerfile index 2bf8e02b5..50c89a8fe 100644 --- a/comps/reranks/fastrag/docker/Dockerfile +++ b/comps/reranks/fastrag/docker/Dockerfile @@ -23,8 +23,8 @@ RUN git clone https://github.com/IntelLabs/fastRAG.git /home/user/fastRAG && \ pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/reranks/requirements.txt && \ pip install --no-cache-dir -r /home/user/comps/reranks/fastrag/requirements.txt && \ - pip install . && \ - pip install .[intel] + pip install --no-cache-dir . && \ + pip install --no-cache-dir .[intel] ENV PYTHONPATH=$PYTHONPH:/home/user diff --git a/comps/reranks/tei/docker/Dockerfile b/comps/reranks/tei/docker/Dockerfile index 2a8e7959f..8c9c198aa 100644 --- a/comps/reranks/tei/docker/Dockerfile +++ b/comps/reranks/tei/docker/Dockerfile @@ -20,7 +20,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/reranks/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/retrievers/langchain/milvus/docker/Dockerfile b/comps/retrievers/langchain/milvus/docker/Dockerfile index 233a0ec13..f8442b65e 100644 --- a/comps/retrievers/langchain/milvus/docker/Dockerfile +++ b/comps/retrievers/langchain/milvus/docker/Dockerfile @@ -21,7 +21,7 @@ USER user COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/retrievers/langchain/milvus/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/retrievers/langchain/pathway/docker/Dockerfile b/comps/retrievers/langchain/pathway/docker/Dockerfile index b70c01f0e..d2d4ec0d3 100644 --- a/comps/retrievers/langchain/pathway/docker/Dockerfile +++ b/comps/retrievers/langchain/pathway/docker/Dockerfile @@ -20,7 +20,7 @@ COPY comps /home/user/comps USER user RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/retrievers/langchain/pathway/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/retrievers/langchain/pinecone/docker/Dockerfile b/comps/retrievers/langchain/pinecone/docker/Dockerfile index 6d36c0f55..18152ee44 100644 --- a/comps/retrievers/langchain/pinecone/docker/Dockerfile +++ b/comps/retrievers/langchain/pinecone/docker/Dockerfile @@ -18,10 +18,9 @@ COPY comps /home/user/comps USER user RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/retrievers/langchain/pinecone/requirements.txt - ENV PYTHONPATH=$PYTHONPATH:/home/user WORKDIR /home/user/comps/retrievers/langchain/pinecone diff --git a/comps/retrievers/langchain/redis/docker/Dockerfile b/comps/retrievers/langchain/redis/docker/Dockerfile index 1993e5fd9..d12ca6954 100644 --- a/comps/retrievers/langchain/redis/docker/Dockerfile +++ b/comps/retrievers/langchain/redis/docker/Dockerfile @@ -18,7 +18,7 @@ COPY comps /home/user/comps USER user RUN pip install --no-cache-dir --upgrade pip && \ - if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ + if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \ pip install --no-cache-dir -r /home/user/comps/retrievers/langchain/redis/requirements.txt ENV PYTHONPATH=$PYTHONPATH:/home/user diff --git a/comps/tts/Dockerfile b/comps/tts/Dockerfile index 9ceaef634..eca35bbef 100644 --- a/comps/tts/Dockerfile +++ b/comps/tts/Dockerfile @@ -13,7 +13,7 @@ COPY comps /home/user/comps RUN pip install --no-cache-dir --upgrade pip && \ if [ "${ARCH}" = "cpu" ]; then \ - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ + pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/tts/requirements.txt ; \ else \ pip install --no-cache-dir -r /home/user/comps/tts/requirements.txt ; \ @@ -23,4 +23,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user WORKDIR /home/user/comps/tts -ENTRYPOINT ["python", "tts.py"] \ No newline at end of file +ENTRYPOINT ["python", "tts.py"] diff --git a/comps/tts/speecht5/Dockerfile b/comps/tts/speecht5/Dockerfile index 7dafd9ea2..310c18ddc 100644 --- a/comps/tts/speecht5/Dockerfile +++ b/comps/tts/speecht5/Dockerfile @@ -22,7 +22,7 @@ USER user RUN pip install --no-cache-dir --upgrade pip && \ if [ "${ARCH}" = "cpu" ]; then \ - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ + pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/tts/requirements.txt ; \ else \ pip install --no-cache-dir -r /home/user/comps/tts/requirements.txt ; \ @@ -32,4 +32,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user WORKDIR /home/user/comps/tts/speecht5 -ENTRYPOINT ["python", "speecht5_server.py", "--device", "cpu"] \ No newline at end of file +ENTRYPOINT ["python", "speecht5_server.py", "--device", "cpu"] diff --git a/comps/tts/speecht5/Dockerfile_hpu b/comps/tts/speecht5/Dockerfile_hpu index 46de4ecd9..3fdd14a7f 100644 --- a/comps/tts/speecht5/Dockerfile_hpu +++ b/comps/tts/speecht5/Dockerfile_hpu @@ -26,7 +26,7 @@ USER user # Install requirements and optimum habana RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /home/user/comps/tts/requirements.txt && \ - pip install optimum[habana] + pip install --no-cache-dir optimum[habana] ENV PYTHONPATH=$PYTHONPATH:/home/user