Skip to content

Instantly share code, notes, and snippets.

@RuKapSan
Forked from Sarctiann/.gitpod.yml
Created April 2, 2024 17:01
Show Gist options
  • Save RuKapSan/6bb7ba616ac768f28c0b70d7ee723bb4 to your computer and use it in GitHub Desktop.
Save RuKapSan/6bb7ba616ac768f28c0b70d7ee723bb4 to your computer and use it in GitHub Desktop.
Gitpod-Mojo
# List the start-up tasks. Learn more: https://www.gitpod.io/docs/configure/workspaces/tasks
tasks:
- name: Install Modular & Mojo
before: |
eval $(command gp env -e)
command: |
curl https://get.modular.com | MODULAR_AUTH=$MODULAR_AUTH sh -
modular install mojo
echo 'export MODULAR_HOME="/home/gitpod/.modular"' >> ~/.zshrc
echo 'export PATH="/home/gitpod/.modular/pkg/packages.modular.com_mojo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
vscode:
extensions:
- "modular-mojotools.vscode-mojo"
- "ms-python.python"

Follow these steps

After Fork the mojo repo. and before (instead of) creating a GitHub workspace:


  1. In the root of your repo, put the .gitpod.yml file.
  2. Create .vscode/ folder and put the settings.json file inside.
  3. Commit your changes.

  1. Go to Gitpod and log in with your GitHub account.
  2. Go to Projects
  3. Create a Project by selecting your forked repo.
  4. Click on Enable Prebuilds
  5. Mark the checkbox Enable Prebuilds
  6. You are in the General tab in the sidebar. Go to Variables
  7. Create an env variable called MODULAR_AUTH with your auth token as value. (You can get it from the SDK installation page).
  8. You are in the Horizontal tab Settings. Go to Branches
  9. Over the branch examples click on the actions icon button (the three dots) and Run Prebuild
  10. Once this is Ready, click on the button New Workspace

Now you have the most powerful remote machine to work with Mojo.

{
"mojo.modularHomePath": "/home/gitpod/.modular"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment