Event Timeline
Comment Actions
I've added these 2 lines of code to the template
+# Add the site-packages to the PYTHONPATH so that pip can discover the installed packages
+ENV PYTHONPATH=/opt/lib/python/site-packages:$PYTHONPATH
seed_image: docker-registry.wikimedia.org/buster:latest base_images: - docker-registry.wikimedia.org/bullseye:latest diff --git a/images/amd/pytorch23/Dockerfile.template b/images/amd/pytorch23/Dockerfile.template index eb5b7a6..48b8ab1 100644 --- a/images/amd/pytorch23/Dockerfile.template +++ b/images/amd/pytorch23/Dockerfile.template @@ -9,3 +9,6 @@ FROM {{ "amd-pytorch-common" | image_tag }} USER {{ "somebody" | uid }} RUN /usr/bin/pip3 install --target /opt/lib/python/base-packages --no-cache-dir --break-system-packages torch==2.3.0 --extra-index-url https://download.pytorch.org/whl/rocm6.0 && \ /bin/bash -c 'for file in $(ls /opt/lib/python/base-packages | egrep -v "bin|share|__pycache__"); do ln -s "/opt/lib/python/base-packages/${file}" "/opt/lib/python/site-packages/${file}"; done' + +# Add the site-packages to the PYTHONPATH so that pip can discover the installed packages +ENV PYTHONPATH=/opt/lib/python/site-packages:$PYTHONPATH ~ ~ ~ ~ ~ ~ ~ ~ ~ (END)