Skip to main content

Jupyter Notebook Service

📘 Jupyter Notebook Service for Your GPU Pod

Use this helper to install and run a Jupyter Notebook inside your GPU pod.
You can then expose it via the Service Exposure feature.

📥 Download the Installer

bash
wget https://assets.hosted.ai/jupyter_manager.sh && chmod +x jupyter_manager.sh

🆘 Command Help

bash
./jupyter_manager.sh --help
bash
Usage:
  jupyter_manager.sh [--start] [--port PORT]
  jupyter_manager.sh --stop
  jupyter_manager.sh --help

Options:
  --start       Install (if needed) and start the Jupyter Notebook service.
                If already running on the selected port, it will not start a new one.

  --stop        Stop the Jupyter Notebook and supervisor safely.

  --port PORT   Specify the port for the Notebook (default: 8888).

  --help        Show this help message.

▶️ Start the Jupyter Service

Start on the default port 8888:

bash
./jupyter_manager.sh --start

Start on a different port:

bash
./jupyter_manager.sh --start --port 9999

📝 Example Output (Explained)

When you start the service, you may see output similar to this:

bash
[jupyter-manager] Starting (or checking) Jupyter Notebook on port 8888...
...
================ JUPYTER LOGIN INFORMATION ================
Token: 1db141e65b...
URL:   http://<server-ip>:8888/?token=1db141e65b...
===========================================================

What this means:

  • The service checks if a Notebook is already running; if not, it installs and starts one.

  • The Jupyter Notebook process starts on the selected port (e.g., 8888).

  • The script waits for Jupyter to finish booting and extracts the login token automatically.

🌍 Enable External Access Through Service Exposure

⛔ Stop the Jupyter Service

./jupyter_manager.sh --stop

This safely shuts down both the Notebook and its background supervisor.