modularml / max

A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform
https://www.modular.com
Other
201 stars 31 forks source link

[Docs] Colab example is missing #184

Open anthony-chaudhary opened 3 days ago

anthony-chaudhary commented 3 days ago

Where is the problem?

There was no colab example

What can we do better?

Created a colab example here https://colab.research.google.com/drive/1Y2pJFwOm-v94sC6ivutmeitnRJixffhS#scrollTo=qJMfX-w5aKAX

This adds the following blocks

!curl -s https://get.modular.com | sh -
!modular auth
!modular install max

Edit: I was playing with having it add to path but not quite there yet:

%%bash

# Set the MODULAR_HOME environment variable
echo 'export MODULAR_HOME="/root/.modular"' >> ~/.bashrc

# Get the MAX_PATH
MAX_PATH=$(modular config max.path)

# Add MAX_PATH to the PATH environment variable
echo 'export PATH="'$MAX_PATH'/bin:$PATH"' >> ~/.bashrc

# Source the bashrc to apply changes
source ~/.bashrc

# Print the updated PATH to verify
echo "Updated PATH: $PATH"

image

The goal is to be able to try this out by using colab and clicking run-all without any further thought.

The manual URL auth step is still required and not documented in the linked example

Anything else?

No response