Skip to content

Commit 4352636

Browse files
authored
Fix trivy issue in Dockerfile (opea-project#1304)
Signed-off-by: ZePan110 <[email protected]>
1 parent 135ef91 commit 4352636

File tree

10 files changed

+12
-7
lines changed

10 files changed

+12
-7
lines changed

comps/animation/src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ARG ARCH=cpu
1313

1414
COPY comps /home/user/comps
1515

16-
RUN pip install --no-cache-dir --upgrade pip && \
16+
RUN pip install --no-cache-dir --upgrade pip setuptools && \
1717
pip install --no-cache-dir -r /home/user/comps/animation/src/requirements.txt ;
1818

1919
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/finetuning/src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN chown -R user /home/user/comps/finetuning
1818

1919
ENV PATH=$PATH:/home/user/.local/bin
2020

21-
RUN python -m pip install --no-cache-dir --upgrade pip && \
21+
RUN python -m pip install --no-cache-dir --upgrade pip setuptools peft && \
2222
python -m pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
2323
python -m pip install --no-cache-dir intel-extension-for-pytorch && \
2424
python -m pip install --no-cache-dir oneccl_bind_pt --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/cn/ && \

comps/finetuning/src/Dockerfile.intel_hpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN chown -R user /home/user/comps/finetuning
1616

1717
ENV PATH=$PATH:/home/user/.local/bin
1818

19-
RUN python -m pip install --no-cache-dir --upgrade pip && \
19+
RUN python -m pip install --no-cache-dir --upgrade pip setuptools && \
2020
python -m pip install --no-cache-dir -r /home/user/comps/finetuning/src/requirements.txt && \
2121
python -m pip install --no-cache-dir optimum-habana
2222

comps/lvms/src/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ ENV LANG=C.UTF-8
1212
COPY comps /home/user/comps
1313

1414
RUN pip install --no-cache-dir --upgrade pip setuptools && \
15-
pip install --no-cache-dir -r /home/user/comps/lvms/src/requirements.txt
15+
pip install --no-cache-dir -r /home/user/comps/lvms/src/requirements.txt && \
16+
pip install --no-cache-dir --upgrade transformers
1617

1718
ENV PYTHONPATH=$PYTHONPATH:/home/user
1819

comps/lvms/src/integrations/dependency/video-llama/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN mkdir /home/user/model && chown user:user -R /home/user/model
1717
COPY --chown=user:user comps /home/user/comps
1818
WORKDIR /home/user/comps/lvms/src/integrations/dependency/video-llama/
1919

20-
RUN pip install --no-cache-dir --upgrade pip && \
20+
RUN pip install --no-cache-dir --upgrade pip setuptools && \
2121
pip install --no-cache-dir -r /home/user/comps/lvms/src/integrations/dependency/video-llama/requirements.txt
2222

2323
ARG VIDEO_LLAMA_REPO=https://github.com/DAMO-NLP-SG/Video-LLaMA.git

comps/third_parties/bridgetower/src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV PYTHONPATH=/home/user:/usr/lib/habanalabs/:/optimum-habana
1313

1414
COPY --chown=user comps /home/user/comps
1515

16-
RUN pip install --no-cache-dir --upgrade pip && \
16+
RUN pip install --no-cache-dir --upgrade pip setuptools && \
1717
pip install --no-cache-dir -r /home/user/comps/third_parties/bridgetower/src/requirements.txt
1818

1919

comps/third_parties/bridgetower/src/Dockerfile.intel_hpu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ COPY --chown=user comps /home/user/comps
1919
# Install requirements and optimum habana
2020
RUN pip install --no-cache-dir --upgrade pip && \
2121
pip install --no-cache-dir -r /home/user/comps/third_parties/bridgetower/src/requirements.txt && \
22+
pip install --no-cache-dir --upgrade transformers && \
2223
pip install --no-cache-dir optimum[habana]
2324

2425
ENV PYTHONPATH=$PYTHONPATH:/home/user

comps/third_parties/wav2lip/src/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ ENV PYTHONPATH="$PYTHONPATH:/usr/local/lib/python3.11/site-packages/gfpgan"
5353
WORKDIR /usr/local/lib/python3.11/site-packages
5454

5555
# Install pip dependencies
56-
RUN pip install -r /home/user/comps/animation/src/requirements.txt
56+
RUN pip install --no-cache-dir --upgrade pip setuptools && \
57+
pip install -r /home/user/comps/animation/src/requirements.txt
5758

5859
# Custom patches
5960
# Modify the degradations.py file to import rgb_to_grayscale from torchvision.transforms.functional

comps/tts/src/integrations/dependency/gpt-sovits/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN git clone https://huggingface.co/lj1995/GPT-SoVITS pretrained_models
2222
RUN mv pretrained_models/* GPT-SoVITS/GPT_SoVITS/pretrained_models/ && \
2323
rm -rf pretrained_models && \
2424
pip install --no-cache-dir -r GPT-SoVITS/requirements.txt && \
25+
pip install --no-cache-dir --upgrade setuptools && \
2526
python -m nltk.downloader averaged_perceptron_tagger_eng cmudict
2627

2728
RUN mv GPT-SoVITS /home/user/

comps/tts/src/integrations/dependency/speecht5/Dockerfile.intel_hpu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ COPY --chown=user:user comps /home/user/comps
2323
# Install requirements and optimum habana
2424
RUN pip install --no-cache-dir --upgrade pip && \
2525
pip install --no-cache-dir -r /home/user/comps/tts/src/integrations/dependency/speecht5/requirements.txt && \
26+
pip install --no-cache-dir --upgrade transformers && \
2627
pip install --no-cache-dir optimum[habana]
2728

2829
ENV PYTHONPATH=$PYTHONPATH:/home/user

0 commit comments

Comments
 (0)