Skip to content

Commit c5c3af2

Browse files
committed
Fix: Code static analysis issue
1 parent 328e909 commit c5c3af2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

intel/runtimes/pytorch/ubi9-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ ENV CPU_ENV=/opt/app-root-cpu
4444
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
4545

4646
#CPU env
47-
RUN cd ${CPU_ENV} && \
48-
python3.9 -m venv ${CPU_ENV} && \
47+
WORKDIR ${CPU_ENV}
48+
RUN python3.9 -m venv ${CPU_ENV} && \
4949
chown -R 1001:0 ${CPU_ENV} && \
5050
fix-permissions ${CPU_ENV} -P && \
5151
source ${CPU_ENV}/bin/activate && \
52-
pip install -U "micropipenv[toml]" && \
52+
pip install --no-cache-dir -U "micropipenv[toml]" && \
5353
micropipenv install && \
5454
rm -f ./Pipfile.lock && \
5555
# Fix permissions to support pip in Openshift environments \

intel/runtimes/tensorflow/ubi9-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ ENV CPU_ENV=/opt/app-root-cpu
4747
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
4848

4949
#CPU env
50-
RUN cd ${CPU_ENV} && \
51-
python3.9 -m venv ${CPU_ENV} && \
50+
WORKDIR ${CPU_ENV}
51+
RUN python3.9 -m venv ${CPU_ENV} && \
5252
chown -R 1001:0 ${CPU_ENV} && \
5353
fix-permissions ${CPU_ENV} -P && \
5454
unlink ${CPU_ENV}/lib64 && \
5555
cp -r ${CPU_ENV}/lib ${CPU_ENV}/lib64 && \
5656
source ${CPU_ENV}/bin/activate && \
57-
pip install -U "micropipenv[toml]" && \
57+
pip install --no-cache-dir -U "micropipenv[toml]" && \
5858
micropipenv install && \
5959
rm -f ./Pipfile.lock && \
6060
# Fix permissions to support pip in Openshift environments \

jupyter/intel/pytorch/ubi9-python-3.9/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ COPY --chown=1001:0 utils /opt/app-root/bin/utils
3434
#CPU env
3535
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
3636

37-
RUN cd ${CPU_ENV} && \
38-
source ${CPU_ENV}/bin/activate && \
37+
WORKDIR ${CPU_ENV}
38+
RUN source ${CPU_ENV}/bin/activate && \
3939
micropipenv install && \
4040
rm -f ./Pipfile.lock && \
4141
python -m ipykernel install --prefix=/opt/app-root --name 'pytorch-cpu' --display-name='pytorch-cpu' && \

jupyter/intel/tensorflow/ubi9-python-3.9/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ COPY --chown=1001:0 utils /opt/app-root/bin/utils
3434
#CPU env
3535
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
3636

37-
RUN cd ${CPU_ENV} && \
38-
source ${CPU_ENV}/bin/activate && \
37+
WORKDIR ${CPU_ENV}
38+
RUN source ${CPU_ENV}/bin/activate && \
3939
micropipenv install && \
4040
rm -f ./Pipfile.lock && \
4141
python -m ipykernel install --prefix=/opt/app-root --name 'tensorflow-cpu' --display-name='tensorflow-cpu' && \

0 commit comments

Comments
 (0)