Skip to content

Commit ed46263

Browse files
Merge pull request #634 from caponetto/rocm-combine-run
Combine `RUN` commands to reduce rocm image size
2 parents dbeac5b + 7a6d8e2 commit ed46263

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.9" \
1414
# Install Python packages and Jupyterlab extensions from Pipfile.lock
1515
COPY Pipfile.lock ./
1616

17-
RUN echo "Installing softwares and packages" && \
18-
micropipenv install && \
19-
rm -f ./Pipfile.lock && \
20-
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
17+
RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && \
18+
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
2119
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
22-
# Disable announcement plugin of jupyterlab \
23-
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
24-
25-
# Fix permissions to support pip in Openshift environments
26-
RUN chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
27-
fix-permissions /opt/app-root -P
20+
# Disable announcement plugin of jupyterlab
21+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
22+
# Fix permissions to support pip in Openshift environments
23+
chmod -R g+w /opt/app-root/lib/python3.9/site-packages && fix-permissions /opt/app-root -P

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ LABEL name="odh-notebook-jupyter-rocm-tensorflow-ubi9-python-3.9" \
1414
# Install Python packages and Jupyterlab extensions from Pipfile.lock
1515
COPY Pipfile.lock ./
1616

17-
RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock
18-
19-
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
20-
RUN sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json
21-
22-
# Disable announcement plugin of jupyterlab
23-
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
24-
25-
# Fix permissions to support pip in Openshift environments
26-
RUN chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
27-
fix-permissions /opt/app-root -P
17+
RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && \
18+
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
19+
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
20+
# Disable announcement plugin of jupyterlab
21+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
22+
# Fix permissions to support pip in Openshift environments
23+
chmod -R g+w /opt/app-root/lib/python3.9/site-packages && fix-permissions /opt/app-root -P

0 commit comments

Comments
 (0)