TensorFlow + JupyterLab

Ubuntu 22.04, CUDA 12.4, TensorFlow (and-cuda), JupyterLab and SSH.

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

TensorFlow + JupyterLab

Same base as PyTorch + JupyterLab with tensorflow[and-cuda] instead of PyTorch.

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

Open Terminal (browser) or Jupyter from the rental page, or use the SSH address line with your key.

2. Verify TensorFlow sees the GPU

python -c "import tensorflow as tf; print(tf.__version__); print(tf.config.list_physical_devices('GPU'))"

An empty list means no GPU: stop and pick another machine (nothing is charged for a failed start).

3. Bring your project

cd /workspace && git clone https://github.com/you/your-project.git
pip install -r your-project/requirements.txt     # kept between runs

Upload data with scp -P <port> -r ./data root@<relay>:/workspace/ or drag files into JupyterLab's file browser.

4. Train

cd /workspace/your-project
python train.py --data /workspace/data --out /workspace/runs/exp1 2>&1 | tee /workspace/runs/exp1.log

Use tf.keras.callbacks.ModelCheckpoint('/workspace/runs/exp1/ckpt-{epoch}') so an interruption costs you an epoch, not a day. Mixed precision (tf.keras.mixed_precision.set_global_policy('mixed_float16')) roughly doubles throughput on RTX cards.

5. Keep installs

pip packages are kept in /workspace; system packages (apt-get) belong in the template's setup script.

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 TensorFlow + JupyterLab