Skip to content
Snippets Groups Projects
Verified Commit 9fa51ef9 authored by Olivier Benz's avatar Olivier Benz
Browse files

MAX: Install CPU-only version of PyTorch in regular images

parent 49a03abe
No related branches found
No related tags found
No related merge requests found
...@@ -463,9 +463,8 @@ RUN curl -ssL https://magic.modular.com | grep '^MODULAR_HOME\|^BIN_DIR' \ ...@@ -463,9 +463,8 @@ RUN curl -ssL https://magic.modular.com | grep '^MODULAR_HOME\|^BIN_DIR' \
&& export PIP_BREAK_SYSTEM_PACKAGES=1 \ && export PIP_BREAK_SYSTEM_PACKAGES=1 \
&& if [ "${INSTALL_MAX}" = "1" ] || [ "${INSTALL_MAX}" = "true" ]; then \ && if [ "${INSTALL_MAX}" = "1" ] || [ "${INSTALL_MAX}" = "true" ]; then \
if [ -z "${CUDA_VERSION}" ]; then \ if [ -z "${CUDA_VERSION}" ]; then \
## MAX: Prevent installation of PyTorch, its own CUDA runtime ## MAX: Install CPU-only version of PyTorch in regular images
## and the required CUDA binaries/libraries in the regular images export PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu"; \
sed -i "/torch/d" /usr/local/lib/python${PYTHON_VERSION%.*}/site-packages/max*.dist-info/METADATA; \
fi; \ fi; \
packages=$(grep "Requires-Dist:" \ packages=$(grep "Requires-Dist:" \
/usr/local/lib/python${PYTHON_VERSION%.*}/site-packages/max*.dist-info/METADATA | \ /usr/local/lib/python${PYTHON_VERSION%.*}/site-packages/max*.dist-info/METADATA | \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment