Skip to content

Commit

Permalink
Apply opendatahub-io#652 to Python 3.11 images
Browse files Browse the repository at this point in the history
  • Loading branch information
caponetto committed Aug 6, 2024
1 parent 4f64627 commit f303351
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jupyter/rocm/pytorch/ubi9-python-3.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.11" \

# Install Python packages and Jupyterlab extensions from Pipfile.lock
COPY Pipfile.lock ./
# Copy utility script
COPY de-vendor-torch.sh ./

RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && \
# De-vendor the ROCm libs that are embedded in Pytorch \
./de-vendor-torch.sh && \
rm ./de-vendor-torch.sh && \
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
# Disable announcement plugin of jupyterlab
Expand Down
5 changes: 5 additions & 0 deletions runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ WORKDIR /opt/app-root/bin
COPY Pipfile.lock ./
# Copy Elyra dependencies for air-gapped enviroment
COPY utils ./utils/
# Copy utility script
COPY de-vendor-torch.sh ./

RUN echo "Installing softwares and packages" && \
micropipenv install && \
rm -f ./Pipfile.lock && \
# De-vendor the ROCm libs that are embedded in Pytorch \
./de-vendor-torch.sh && \
rm ./de-vendor-torch.sh && \
# Fix permissions to support pip in Openshift environments \
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
fix-permissions /opt/app-root -P
Expand Down

0 comments on commit f303351

Please sign in to comment.