File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
tensorflow/ubi9-python-3.9
tensorflow/ubi9-python-3.9 Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,12 @@ ENV CPU_ENV=/opt/app-root-cpu
44
44
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
45
45
46
46
# 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} && \
49
49
chown -R 1001:0 ${CPU_ENV} && \
50
50
fix-permissions ${CPU_ENV} -P && \
51
51
source ${CPU_ENV}/bin/activate && \
52
- pip install -U "micropipenv[toml]" && \
52
+ pip install --no-cache-dir - U "micropipenv[toml]" && \
53
53
micropipenv install && \
54
54
rm -f ./Pipfile.lock && \
55
55
# Fix permissions to support pip in Openshift environments \
Original file line number Diff line number Diff line change @@ -47,14 +47,14 @@ ENV CPU_ENV=/opt/app-root-cpu
47
47
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
48
48
49
49
# 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} && \
52
52
chown -R 1001:0 ${CPU_ENV} && \
53
53
fix-permissions ${CPU_ENV} -P && \
54
54
unlink ${CPU_ENV}/lib64 && \
55
55
cp -r ${CPU_ENV}/lib ${CPU_ENV}/lib64 && \
56
56
source ${CPU_ENV}/bin/activate && \
57
- pip install -U "micropipenv[toml]" && \
57
+ pip install --no-cache-dir - U "micropipenv[toml]" && \
58
58
micropipenv install && \
59
59
rm -f ./Pipfile.lock && \
60
60
# Fix permissions to support pip in Openshift environments \
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ COPY --chown=1001:0 utils /opt/app-root/bin/utils
34
34
# CPU env
35
35
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
36
36
37
- RUN cd ${CPU_ENV} && \
38
- source ${CPU_ENV}/bin/activate && \
37
+ WORKDIR ${CPU_ENV}
38
+ RUN source ${CPU_ENV}/bin/activate && \
39
39
micropipenv install && \
40
40
rm -f ./Pipfile.lock && \
41
41
python -m ipykernel install --prefix=/opt/app-root --name 'pytorch-cpu' --display-name='pytorch-cpu' && \
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ COPY --chown=1001:0 utils /opt/app-root/bin/utils
34
34
# CPU env
35
35
COPY --chown=1001:0 Pipfile.lock.cpu ${CPU_ENV}/Pipfile.lock
36
36
37
- RUN cd ${CPU_ENV} && \
38
- source ${CPU_ENV}/bin/activate && \
37
+ WORKDIR ${CPU_ENV}
38
+ RUN source ${CPU_ENV}/bin/activate && \
39
39
micropipenv install && \
40
40
rm -f ./Pipfile.lock && \
41
41
python -m ipykernel install --prefix=/opt/app-root --name 'tensorflow-cpu' --display-name='tensorflow-cpu' && \
You can’t perform that action at this time.
0 commit comments