1. Overview
This server is automatically deployed using a production-grade installation script with the following features:
- Ubuntu 22.04 / 24.04 support
- Python virtual environment isolation
- JupyterLab (Jupyter Server 2.x)
- Password authentication via IdentityProvider
- Systemd service management
- Nginx reverse proxy
- GPU-aware auto PyTorch installation
- Automatic apt lock handling & retry logic
JupyterLab is accessible at:
http://<SERVER-IP>/2. Deployment Architecture
Directory Structure
| Component | Path |
|---|---|
| Python virtual environment | /opt/jupyterlab/venv |
| Jupyter configuration | /home/administrator/.jupyter/ |
| Jupyter config file | /home/administrator/.jupyter/jupyter_server_config.json |
| Systemd service | /etc/systemd/system/jupyter-lab.service |
| Nginx config | /etc/nginx/sites-available/jupyterlab |
| Installation log | /var/log/install-jupyterlab.log |
Runtime Flow
Browser
↓
Nginx (Port 80)
↓
JupyterLab (127.0.0.1:8888)- Jupyter listens locally only
- Public access is handled by Nginx
- Token authentication is disabled
- Password authentication is enabled
3. GPU Auto-Detection & PyTorch Installation
During installation, the script automatically:
- Detects NVIDIA GPU using
nvidia-smi - Reads Compute Capability
- If Compute Capability ≥ 7.0
- Automatically installs:
torch
torchvision
torchaudioIf:
- No GPU detected → skipped
- Compute Capability < 7.0 → skipped
This ensures:
- Modern GPUs (V100, A100, RTX 30/40 series, A6000, etc.) get PyTorch automatically
- Older GPUs or CPU-only servers remain lightweight
4. Accessing JupyterLab
Open browser:
http://<SERVER-IP>/Login using the configured password.
5. Service Management
Restart Jupyter
sudo systemctl restart jupyter-labStop Jupyter
sudo systemctl stop jupyter-labStart Jupyter
sudo systemctl start jupyter-labCheck Status
sudo systemctl status jupyter-lab6. Nginx Management
Restart:
sudo systemctl restart nginxCheck status:
sudo systemctl status nginx7. Changing the Password
There are two supported methods.
Method 1 — Recommended (Simple Method)
Step 1 — Switch to administrator
sudo -i -u administratorStep 2 — Activate virtual environment
source /opt/jupyterlab/venv/bin/activateStep 3 — Change password
jupyter lab passwordFollow the prompts.
Step 4 — Restart Jupyter
exit
sudo systemctl restart jupyter-labDone.
Method 2 — Manual (Advanced Users)
Activate environment
source /opt/jupyterlab/venv/bin/activateGenerate password hash
python -c "from jupyter_server.auth import passwd; print(passwd())"Edit configuration
sudo nano /home/administrator/.jupyter/jupyter_server_config.jsonReplace:
"hashed_password": "OLD_HASH"Restart:
sudo systemctl restart jupyter-lab8. Installing Additional Python Packages
Activate:
source /opt/jupyterlab/venv/bin/activateInstall:
pip install <package-name>Example:
pip install transformers
pip install pandasRestart if needed:
sudo systemctl restart jupyter-lab9. Logs
Installation log
sudo cat /var/log/install-jupyterlab.logJupyter runtime logs
sudo journalctl -u jupyter-lab -fNginx logs
sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.log10. Default Ports
| Service | Port |
|---|---|
| Public Access (Nginx) | 80 |
| Internal Jupyter | 8888 |
Port 8888 is not exposed externally.
Final Summary
This AI-ready Jupyter deployment provides:
- Secure authentication
- GPU-aware optimization
- Automatic PyTorch installation
- Production-grade service management
- Clean virtual environment isolation
- Ubuntu compatibility
- Cloud-init readiness
It is designed for scalable AI infrastructure and GPU server environments.
Outline
