Skip to content

Commit 5aead78

Browse files
authored
Merge pull request #17 from Sydney-Informatics-Hub/marimo
Add marimo tutorial
2 parents 3515861 + 6935cff commit 5aead78

7 files changed

Lines changed: 64 additions & 1 deletion

_quarto.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ website:
3939

4040
- section: "Tutorials"
4141
contents:
42-
- text: "Creating a basic Jupyter Lab workload"
42+
- text: "Creating a Jupyter Lab workload"
4343
href: notebooks/jupyter_tutorial.html
44+
- text: "Creating a Marimo Python workload"
45+
href: notebooks/marimo_tutorial.html
4446
- text: "How to transfer data to/from the SIH GPU Cluster"
4547
href: notebooks/data_transfer.html
4648
- text: "How to run a terminal using the Command Line Interface (CLI)"

fig/workload_connect_marimo.png

35.6 KB
Loading

fig/workload_datasource_marimo.png

32 KB
Loading

fig/workload_definition_marimo.png

102 KB
Loading
74.1 KB
Loading
84.1 KB
Loading

notebooks/marimo_tutorial.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Tutorial: Running a [Marimo Notebook](https://marimo.io) Workspace
2+
3+
A workload is the actual job or task you want to run on the platform. This could be training an AI model, and running an inference model and exposing its endpoint, doing data preprocessing, or conducting a scientific simulation.
4+
5+
Generally, the minimum requirements you need before creating the workload include:
6+
7+
- Being granted permission to an active project
8+
- An [environment](environments.md) to run such job
9+
- Have created a data source, e.g. a PVC, to store your input and output data
10+
- Understand the compute resources you need to run the job and have the option available under "Compute Resources"
11+
12+
In this tutorial, we will create a simple Marimo workload that allows you to run python Marimo notebooks interactively on the SIH GPU cluster.
13+
14+
[Marimo notebook example gallery](https://marimo.io/gallery)
15+
16+
## Step 1: Create a workload
17+
18+
Navigate to the Workloads section of the platform and click on the "NEW WORKLOAD" button. Select "Workspace" from the dropdown menu.
19+
20+
![New workload](../fig/workload_create_workspace.png)
21+
22+
## Step 2: Configure the workload from scratch
23+
24+
Define the necessary information for your workload:
25+
26+
- Under "Projects" select the project it will be linked to
27+
- Under "Templates" select "Start from scratch" (*i.e.* do not use any existing template)
28+
- Provide a descriptive name for the workload
29+
30+
![Project and Template](../fig/workload_definition_marimo.png)
31+
32+
- Select an environment to create the container. The SIH team has set up the [marimo:latest container image](https://github.com/marimo-team/marimo/pkgs/container/marimo) (`ghcr.io/marimo-team/marimo:latest`) to run in [uv](https://docs.astral.sh/uv/) so that packages can be install automatically.
33+
34+
![Software environment](../fig/workload_environment_marimo.png)
35+
36+
- Select the amount of compute resources to run the workload. In this tutorial, we will select the `small-fraction` option that requires 1 H200 GPU with 10% of its memory (\~14GB).
37+
38+
![Compute resource](../fig/workload_comp_resource.png)
39+
40+
- Configure the [data source](./data_sources.md) to be mounted to the container. Here we select the default PVC created for the project. The mount path inside the container is set to `/scratch/<dashr_project_shortcode>`.
41+
42+
![Data resource](../fig/workload_datasource_marimo.png)
43+
44+
- Lastly, Click on "CREATE WORKLOAD" to submit the workload to the cluster.
45+
46+
## Step 3: Connect to Marimo
47+
48+
When the status changes to "Running", you can access the Marimo interface by selecting "Marimo" under "CONNECT".
49+
50+
![Connect to the Marimo interface](../fig/workload_connect_marimo.png)
51+
52+
## Step 4. Create New Notebook in Marimo
53+
54+
You're ready to go!
55+
![Connect to the Marimo interface](../fig/workload_marimo_create_notebook.png)
56+
57+
## (Optional) Step 5: Inspect system logs
58+
59+
You can review the system logs to access details about event history, workload metrics, and real-time container output. This information is especially useful for debugging issues when a workload fails to start.
60+
61+
![Workload logs](../fig/workload_logs.png)

0 commit comments

Comments
 (0)