Jupyter Notebook
Deploy GPU instances with Jupyter Notebook pre-configured for interactive AI/ML development.
What's Included
Jupyter Environment:- Jupyter Notebook / JupyterLab
- IPython kernel
- GPU support enabled
- PyTorch or TensorFlow (depending on environment)
- NumPy, Pandas, Matplotlib, Seaborn
- scikit-learn, SciPy
- CUDA toolkit and GPU drivers
- Ubuntu 22.04 or 24.04 LTS
- Python 3.9-3.11
- pip and conda
Deploying Jupyter Environment
Select Environment
- Go to app.spheron.ai → Deploy
- Choose your GPU (RTX 4090 recommended for development)
- Select OS:
- Ubuntu 24.04 LTS ML Everything - Includes PyTorch + TensorFlow
- Ubuntu 24.04 LTS ML PyTorch - PyTorch focused
- Ubuntu 24.04 LTS ML TensorFlow - TensorFlow focused
- Deploy
Connect via SSH
ssh root@your-instance-ipStarting Jupyter Notebook
Basic Setup
# Start Jupyter on all interfaces
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root
# Or with custom password
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='your-password'Access Jupyter
From your browser:http://your-instance-ip:8888Get token (if not set custom password):
jupyter notebook listRun in Background
# Using nohup
nohup jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root &
# Using screen
screen -S jupyter
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root
# Press Ctrl+A then D to detachConfiguration
Set Password
# Generate password
jupyter notebook password
# Or via config file
jupyter notebook --generate-configEdit ~/.jupyter/jupyter_notebook_config.py:
c.NotebookApp.password = 'your-hashed-password'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
c.NotebookApp.allow_root = TrueEnable GPU in Notebooks
For PyTorch:import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU count: {torch.cuda.device_count()}")
print(f"GPU name: {torch.cuda.get_device_name(0)}")import tensorflow as tf
print(f"GPU devices: {tf.config.list_physical_devices('GPU')}")Quick Examples
Create New Notebook
- Access Jupyter in browser
- Click New → Python 3
- Start coding
Install Additional Packages
# In notebook cell
!pip install transformers accelerate bitsandbytes
# Or from terminal
pip install package-nameMonitor GPU Usage
# In notebook
!nvidia-smi
# Or use gpustat
!pip install gpustat
!gpustat -i 1Troubleshooting
Cannot access Jupyter in browser:- Verify Jupyter is running:
ps aux | grep jupyter - Check port 8888 is open
- Use instance public IP, not localhost
- Verify token/password
# Check CUDA installation
!nvcc --version
!nvidia-smi
# Reinstall PyTorch with CUDA
!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118# Check logs
tail -f ~/.jupyter/*.log
# Restart Jupyter
pkill jupyter
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root# Use different port
jupyter notebook --ip=0.0.0.0 --port=8889 --no-browser --allow-rootAdditional Resources
- Jupyter Documentation
- Getting Started - Deploy your first instance
- Quick Start - Fast deployment options
- SSH Connection - SSH setup guide