Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Docker stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JupyterLab
Mojo
Docker stack
Commits
ea260a6c
Verified
Commit
ea260a6c
authored
2 weeks ago
by
Olivier Benz
Browse files
Options
Downloads
Patches
Plain Diff
MAX: Add max-pipelines
parent
bf38d25e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
base/latest.Dockerfile
+11
-4
11 additions, 4 deletions
base/latest.Dockerfile
with
11 additions
and
4 deletions
base/latest.Dockerfile
+
11
−
4
View file @
ea260a6c
...
...
@@ -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 \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment