PyTorch + JupyterLab

Ubuntu 22.04, CUDA 12.4, PyTorch (cu124), JupyterLab and SSH. The default interactive image.

DetailValue
Imageghcr.io/fairgpu/base-cuda:latest
Modeinteractive
Ports22/ssh, 8888/http
Needsany GPU, 10 GB disk
Compatible machines online1
Used0 times

PyTorch + JupyterLab

CUDA 12.4 + cuDNN runtime, PyTorch/torchvision/torchaudio (cu124 wheels), JupyterLab, numpy/pandas/matplotlib, git, tmux, htop.

  • SSH: ssh -p <port> root@<relay> with the key from your account.
  • JupyterLab on port 8888 (token pre-filled in the Connect dialog).
  • Works on any NVIDIA GPU; pick ≥ 12 GB VRAM for training mid-size models.

Before you stop

Everything you create lives inside the container on the host's disk and is removed when the rental ends. Push results out before stopping (scp, rsync, git, HF Hub, S3...). From inside the container you can run fairgpu extend 60 to add time, fairgpu mark "epoch 3 done" to annotate the timeline and fairgpu stop when you are done.

Step by step

1. Connect

  • Browser terminal: click Terminal on the rental page - nothing to install.
  • JupyterLab: click the Jupyter link (the token is already in the URL). Notebooks you keep in /workspace survive stops.
  • SSH / VS Code: copy the SSH address line (root@<relay> -p <port>); VS Code → Remote-SSH: Connect to Host with the config block from the Connect dialog.

2. Check the GPU

nvidia-smi
python -c "import torch; print(torch.__version__, torch.cuda.is_available(), torch.cuda.get_device_name(0))"

True and your GPU name mean CUDA works. If it prints False, stop the rental and pick another machine (you are only billed for the minutes used; a failed start is free).

3. Put your data and code in /workspace

cd /workspace
git clone https://github.com/you/your-project.git
pip install -r your-project/requirements.txt      # pip installs land in /workspace too and are kept
huggingface-cli download org/dataset --repo-type dataset --local-dir /workspace/data

From your computer: scp -P <port> -r ./data root@<relay>:/workspace/ or rsync -avz -e "ssh -p <port>" ./data/ root@<relay>:/workspace/data/.

4. Train

cd /workspace/your-project
nohup python train.py --out /workspace/runs/exp1 > /workspace/runs/exp1.log 2>&1 &
tail -f /workspace/runs/exp1.log

Write checkpoints under /workspace/runs. For unattended runs use Commands on the rental page (or fairgpu run "python train.py") so you get an email when it exits, and turn on a 30-min checkpoint interval in Keep my environment.

5. Install things permanently

pip install is kept (it goes to /workspace). apt-get install is not - put those lines in the setup script of your template so they run at every start.

Save your results before you stop

  • Everything outside /workspace disappears when the rental stops; /workspace survives on the same host (persistent workspace) and anywhere with a FairGPU checkpoint.
  • Save checkpoint now on the rental page (or fairgpu snapshot save "label" inside the container) archives /workspace to FairGPU cloud storage; Download workspace gets it to your computer.
  • scp -P <port> root@<relay>:/workspace/results ./ copies files out over SSH; rsync and SFTP (WinSCP/FileZilla) work the same way.
  • Stop the rental to stop billing. Set an idle auto-stop if you tend to forget, or buy the $0.99 finish alert (SMS + email).

Machines that can run it

MachineGPUVRAMPriceStatusReliabilityCountryHostCached
WhiteBobNVIDIA GeForce RTX 5060 Ti16 GB$0.10/hravailable now62 %-Aharon Sela-

Pick a machine for PyTorch + JupyterLab