Skip to content

Commit f1f866f

Browse files
authored
Using '--no-cache-dir' within all Dockerfiles (#607)
Signed-off-by: Abolfazl Shahbazi <[email protected]>
1 parent 8369fbf commit f1f866f

File tree

34 files changed

+48
-50
lines changed

34 files changed

+48
-50
lines changed

.github/workflows/mix-megaservice-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
6969
- name: Install Dependencies
7070
run: |
71-
docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /GenAIComps && pip install -r requirements.txt && python setup.py install"
71+
docker exec ${{ env.CONTAINER_NAME }} bash -c "cd /GenAIComps && pip install --no-cache-dir -r requirements.txt && python setup.py install"
7272
7373
- name: Run UT
7474
run: |

.github/workflows/scripts/codeScan/bandit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0
55

66
source /GenAIComps/.github/workflows/scripts/change_color
7-
pip install bandit==1.7.8
7+
pip install --no-cache-dir bandit==1.7.8
88
log_dir=/GenAIComps/.github/workflows/scripts/codeScan
99
python -m bandit -r -lll -iii /GenAIComps > ${log_dir}/bandit.log
1010
exit_code=$?

.github/workflows/scripts/freeze_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function check_branch_name() {
5555

5656
function main() {
5757
check_branch_name
58-
echo "::group::pip install pip-tools" && pip install pip-tools --upgrade && echo "::endgroup::"
58+
echo "::group::pip install --no-cache-dir pip-tools" && pip install --no-cache-dir pip-tools --upgrade && echo "::endgroup::"
5959
export -f freeze
6060
find . -name "requirements.txt" | xargs -n 1 -I {} bash -c 'freeze "$@"' _ {}
6161
}

comps/asr/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY comps /home/user/comps
1515

1616
RUN pip install --no-cache-dir --upgrade pip && \
1717
if [ "${ARCH}" = "cpu" ]; then \
18-
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \
18+
pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \
1919
pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/asr/requirements.txt ; \
2020
else \
2121
pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt ; \
@@ -25,4 +25,4 @@ ENV PYTHONPATH=$PYTHONPATH:/home/user
2525

2626
WORKDIR /home/user/comps/asr
2727

28-
ENTRYPOINT ["python", "asr.py"]
28+
ENTRYPOINT ["python", "asr.py"]

comps/asr/whisper/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ USER user
2323
RUN pip install --no-cache-dir --upgrade pip && \
2424
pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt && \
2525
if [ "${ARCH}" = "cpu" ]; then \
26-
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \
26+
pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \
2727
pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/asr/requirements.txt ; \
2828
else \
2929
pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt ; \

comps/asr/whisper/Dockerfile_hpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ USER user
2525
# Install requirements and optimum habana
2626
RUN pip install --no-cache-dir --upgrade pip && \
2727
pip install --no-cache-dir -r /home/user/comps/asr/requirements.txt && \
28-
pip install optimum[habana]
28+
pip install --no-cache-dir optimum[habana]
2929

3030
ENV PYTHONPATH=$PYTHONPATH:/home/user
3131

comps/dataprep/milvus/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ USER user
2222
COPY comps /home/user/comps
2323

2424
RUN pip install --no-cache-dir --upgrade pip setuptools && \
25-
if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
25+
if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
2626
pip install --no-cache-dir -r /home/user/comps/dataprep/milvus/requirements.txt
2727

2828
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/dataprep/pgvector/langchain/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ USER user
2222
COPY comps /home/user/comps
2323

2424
RUN pip install --no-cache-dir --upgrade pip setuptools && \
25-
if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
25+
if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
2626
pip install --no-cache-dir -r /home/user/comps/dataprep/pgvector/langchain/requirements.txt
2727

2828
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/dataprep/pinecone/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN pip install --no-cache-dir --upgrade pip && \
2626
pip install --no-cache-dir -r /home/user/comps/dataprep/pinecone/requirements.txt
2727

2828
RUN pip install --no-cache-dir --upgrade pip setuptools && \
29-
if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
29+
if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
3030
pip install --no-cache-dir -r /home/user/comps/dataprep/pinecone/requirements.txt
3131

3232
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/dataprep/qdrant/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ USER user
2222
COPY comps /home/user/comps
2323

2424
RUN pip install --no-cache-dir --upgrade pip setuptools && \
25-
if [ ${ARCH} = "cpu" ]; then pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
25+
if [ ${ARCH} = "cpu" ]; then pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu; fi && \
2626
pip install --no-cache-dir -r /home/user/comps/dataprep/qdrant/requirements.txt
2727

2828
ENV PYTHONPATH=$PYTHONPATH:/home/user

0 commit comments

Comments
 (0)