How do I run a Jupyter notebook on a cloud GPU?

Deploy a Raw GPU on CloudGPU, which comes with JupyterLab and CUDA pre-installed, open JupyterLab in your browser, and check the GPU from the first cell with !nvidia-smi and torch.cuda.is_available(); when you are done, copy your notebooks and results off the instance and destroy it, which stops billing.

Updated 2026-10-27

This guide follows the official JupyterLab, Jupyter Server and PyTorch documentation, read on 2026-10-27, and CloudGPU’s own /deploy, /docs and /pricing pages, read the same day.

What you need

  • On your computer: a web browser and an SSH client (for the tunnel in Step 3).
  • On CloudGPU: a balance and an instance from /deploy using the Raw GPU option. Our deploy page describes it as “a raw GPU with JupyterLab + CUDA pre-installed. SSH access, root on a dedicated container, install any Python/CUDA libs you want.” GPU time is billed per minute, rounded up, with a 1-minute minimum, and billing stops when you destroy the instance (see /terms); current rates are on /pricing.

You can top up by card (Visa or Mastercard), Alipay, Google Pay or Apple Pay, or with USDT, as listed on /pricing.

Step 1: Pick a card and deploy a Raw GPU

  1. Open /deploy and choose Raw GPU (under “Need SSH + your own environment?”).
  2. Pick a card. Cards listed on our /pricing page on 2026-10-27 include RTX 5090 32G, RTX 4090 24G, RTX 4090 48G, RTX 3090 24G, RTX A6000, A100 80G, A100 40G and RTX PRO 6000 96G.
  3. Deploy it, then copy the instance’s SSH host, port, user and password from your instance in the CloudGPU dashboard.

Which card fits your notebook? VRAM need depends on model, precision and workflow; see How much VRAM do I need to run an LLM? before you pick.

Step 2: Check the environment first

Before installing anything, open a terminal on the instance (over SSH, or a JupyterLab terminal, which runs on the machine where the Jupyter server runs) and run:

nvidia-smi
nvcc --version
python3 --version
jupyter lab --version
  • nvidia-smi should list the card you picked and the driver version.
  • If nvcc is not found, the CUDA toolkit is probably not on PATH in that shell. Our deploy page says the Raw GPU comes with CUDA pre-installed; find the CUDA install folder and add its bin directory to PATH.
  • If jupyter lab --version fails, install JupyterLab. According to the official JupyterLab installation docs, with pip that is:
pip install jupyterlab

Step 3: Open JupyterLab in your browser

Option A: a JupyterLab link in the dashboard. If your instance offers a JupyterLab link, you can open it directly. We have not documented here how that link is protected, so for anything sensitive use Option B.

Option B: start JupyterLab yourself and reach it over an SSH tunnel. According to the official Jupyter Server docs, “By default, Jupyter Server runs locally at 127.0.0.1:8888 and is accessible only from localhost.” That default is what you want on a rented machine: keep JupyterLab on localhost and forward the port over SSH instead of opening it to the internet.

On the instance (over SSH), start JupyterLab in your work folder. The official Starting JupyterLab page uses jupyter lab; the options below are from the official Jupyter Server config reference (ServerApp.ip, ServerApp.port, ServerApp.open_browser):

mkdir -p ~/work && cd ~/work
jupyter lab --ServerApp.ip=127.0.0.1 --ServerApp.port=8888 --ServerApp.open_browser=False

JupyterLab prints a URL that contains a login token. Keep that terminal open (or run it inside tmux).

On your computer, open the tunnel with the SSH host, port and user from the instance page:

ssh -N -L 8888:127.0.0.1:8888 -p <port> <user>@<host>

Then open the http://127.0.0.1:8888/lab?token=... URL that JupyterLab printed. If you want a password instead of the token, the Jupyter Server docs describe jupyter server password.

Step 4: Confirm the notebook sees the GPU

Create a new notebook with a Python 3 kernel and run:

!nvidia-smi
import torch
x = torch.rand(5, 3)
print(x)
print(torch.cuda.is_available())
print(torch.cuda.get_device_name(0))

The first two lines are the verification snippet from the official PyTorch Get Started page, which also gives torch.cuda.is_available() as the check that “your GPU driver and CUDA/ROCm is enabled and accessible by PyTorch”. This guide does not say which PyTorch version, if any, is pre-installed on the Raw GPU image; if import torch fails, use the install command that the PyTorch selector on that page gives for Linux, pip and your CUDA version (the one nvidia-smi reports).

Step 5: Install packages and keep long runs alive

  • Install into the kernel you are using with import sys; !{sys.executable} -m pip install <package> in a cell, or with pip in a JupyterLab terminal.
  • For long training runs, start the work in tmux from a terminal, or write the training loop as a script and launch it from the terminal, so a closed browser tab does not stop it.
  • Watch GPU memory and use from a terminal with nvidia-smi.

Step 6: Back up your work, then destroy the instance

Our /pricing FAQ says: “Destroying an instance deletes everything stored on it, and an instance is destroyed if the balance runs out. There is no persistent storage across instances yet, so copy your results off the instance before you destroy it.” Our /docs add that stopped instances release their GPU, so you create a new instance to resume.

Before you destroy:

  1. In the JupyterLab file browser, right-click a file and choose Download, or from your computer: scp -P <port> <user>@<host>:~/work/<file> .
  2. Push code to your own git repository and upload checkpoints to your own storage.

Then destroy the instance from the dashboard. GPU time is billed per minute, rounded up, with a 1-minute minimum, and billing stops when you destroy the instance; see our Terms.

FAQ

Does a CloudGPU Raw GPU come with JupyterLab?

Yes. Our deploy page describes the Raw GPU option as a raw GPU with JupyterLab and CUDA pre-installed, with SSH access and root on a dedicated container, so you can install any Python or CUDA libraries you need.

How do I open JupyterLab without exposing it to the internet?

Start JupyterLab on the instance bound to 127.0.0.1, which is the Jupyter Server default, and forward the port from your computer with ssh -N -L 8888:127.0.0.1:8888 -p @. Then open the URL with the token that JupyterLab printed.

Do my notebooks stay on the instance after I destroy it?

No. Destroying an instance deletes everything stored on it, and there is no persistent storage across instances yet. Download your notebooks and results, or push them to your own git repository or storage, before you destroy the instance.

How is a notebook session billed?

GPU time is billed per minute, rounded up, with a 1-minute minimum, and billing stops when you destroy the instance. See current rates on the pricing page and full rules in the Terms.