Skip to content

Commit 3cd13cd

Browse files
committedSep 12, 2024·
resolve venv vulns
Signed-off-by: Srikanth Ramakrishna <srikanth.ramakrishna@intel.com>
1 parent 6655ae7 commit 3cd13cd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed
 

‎pytorch/Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,12 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missin
229229
python3-venv && \
230230
rm -rf /var/lib/apt/lists/*
231231

232-
RUN python3 -m venv /home/venv
232+
COPY venv-requirements.txt .
233+
234+
RUN python3 -m venv /home/venv && \
235+
/home/venv/bin/python -m pip install --no-cache-dir --upgrade pip && \
236+
/home/venv/bin/python -m pip install --no-cache-dir -r venv-requirements.txt && \
237+
rm -rf venv-requirements.txt
233238

234239
ENV PATH="/home/venv/bin:$PATH"
235240

@@ -320,8 +325,6 @@ ARG GID=109
320325
RUN groupadd -g ${GID} render &&\
321326
usermod -aG video,render model-server
322327

323-
RUN python -m pip install pip==23.3 setuptools==70.0.0
324-
325328
USER model-server
326329

327330
WORKDIR /home/model-server

‎pytorch/venv-requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
setuptools>=70.0.0
2+
psutil==6.0.0
3+
mkl==2024.2.1
4+
mkl-include==2024.2.1
5+
intel-openmp==2024.2.1

0 commit comments

Comments
 (0)