This example deploys a GPU instance from the PyTorch template with JupyterLab turned on, opens it in your browser, and keeps your notebooks on a network volume so they survive a stop.
openssl rand -hex 24.Open the Storage page, click Create volume, name it notebooks, set Capacity to 50, and click Create volume.
featherless-cloud volume create notebooks --gb 50 --wait
Open the Instances page and click Deploy instance. Name the instance jupyter. Keep the PyTorch (ROCm) template.
Under Compute, choose a GPU model and 1 GPU.
Under Network volumes, click Add network volume, choose notebooks, and keep the mount path /workspace. JupyterLab opens in /workspace.
Under Public ports, enter 8888.
Under Environment variables, add:
| Name | Value |
|---|---|
ENABLE_JUPYTER | true |
JUPYTER_TOKEN | Your token |
Click Review launch, then Launch instance.
featherless-cloud instance create \
--name jupyter \
--template featherless/rocm-pytorch \
--gpu-count 1 \
--volume notebooks:/workspace \
--port 8888 \
--env ENABLE_JUPYTER=true \
--env JUPYTER_TOKEN="$(openssl rand -hex 24)"
Keep the token you generated; you need it to sign in. featherless-cloud instance get jupyter prints the address of port 8888.
JUPYTER_TOKEN, not a secret variable: JupyterLab reads it from the environment. Members of your organization can see it on the instance's Details tab. Without a token, anyone with the address can run code on your instance.Once the instance is running, open its Connect tab and click the address listed for port 8888. Enter your token on the login page.
To skip the login page, add the token to the address: <address>/lab?token=<your-token>.
The file browser shows the contents of notebooks. Check the GPU from a notebook cell; it prints True and the GPU's name:
import torch
torch.cuda.is_available(), torch.cuda.get_device_name(0)
Stopping ends compute billing. Notebooks in /workspace stay on the volume; packages you installed with pip are on the container disk and are erased.
Open the instance, click Stop, and confirm with Stop instance. Click Start to continue later.
featherless-cloud instance stop jupyter
featherless-cloud instance start jupyter
To get your packages back after a stop, keep a requirements.txt on the volume and run pip install -r /workspace/requirements.txt after each start.
Delete the instance, then the volume if you no longer need its files:
featherless-cloud instance delete jupyter
featherless-cloud volume delete notebooks