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

MAX: Add max-pipelines

parent bf38d25e
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@ FROM ${BUILD_ON_IMAGE}${PYTHON_VERSION:+:}${PYTHON_VERSION}${CUDA_IMAGE_FLAVOR:+
## For use with the NVIDIA Container Runtime
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV NVIDIA_PRODUCT_NAME=CUDA
FROM ${BUILD_ON_IMAGE}${PYTHON_VERSION:+:}${PYTHON_VERSION}${CUDA_IMAGE_FLAVOR:+-}${CUDA_IMAGE_FLAVOR} AS base-mojo
......@@ -272,10 +273,10 @@ RUN cd /tmp \
&& if [ "${INSTALL_MAX}" = "1" ] || [ "${INSTALL_MAX}" = "true" ]; then \
if [ "${MOJO_VERSION}" = "nightly" ]; then \
magic init -c conda-forge -c https://conda.modular.com/max-nightly; \
magic add max; \
magic add max max-pipelines; \
else \
magic init -c conda-forge -c https://conda.modular.com/max; \
magic add max==${MOJO_VERSION}; \
magic add max==${MOJO_VERSION} max-pipelines==${MOJO_VERSION}; \
fi \
else \
if [ "${MOJO_VERSION}" = "nightly" ]; then \
......@@ -295,6 +296,8 @@ RUN cd /tmp \
&& mkdir -p /opt/modular/share \
&& cd /tmp/.magic/envs \
&& if [ "${INSTALL_MAX}" = "1" ] || [ "${INSTALL_MAX}" = "true" ]; then \
cp -a default/bin/max* \
/opt/modular/bin; \
cp -a default/lib/libDevice* \
default/lib/libGenericMLSupport* \
default/lib/libmodular* \
......@@ -305,8 +308,6 @@ RUN cd /tmp \
default/lib/libStock* \
default/lib/libTorch* \
/opt/modular/lib; \
fi \
&& if [ "${INSTALL_MAX}" = "1" ] || [ "${INSTALL_MAX}" = "true" ]; then \
cp -a default/lib/python${PYTHON_VERSION%.*}/site-packages/max* \
/usr/local/lib/python${PYTHON_VERSION%.*}/site-packages; \
fi \
......@@ -336,6 +337,12 @@ RUN cd /tmp \
## Fix Modular home for Mojo
&& sed -i "s|/tmp/.magic/envs/default|/opt/modular|g" \
${MODULAR_HOME}/modular.cfg \
&& if [ "${INSTALL_MAX}" = "1" ] || [ "${INSTALL_MAX}" = "true" ]; then \
## Fix Python path for max-serve, max-pipelines
sed -i "s|/tmp/.magic/envs/default|/usr/local|g" \
/opt/modular/bin/max-serve \
/opt/modular/bin/max-pipelines; \
fi \
## Fix Python path for mblack
&& sed -i "s|/tmp/.magic/envs/default|/usr/local|g" \
/opt/modular/bin/mblack \
......
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