Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hydra Personal GPU Cluster

This repo now has a clean Colab notebook that turns a Google Colab GPU runtime into a personal remote GPU cluster.

It does not install model repos. It only starts:

  • a FastAPI control server
  • an ngrok tunnel
  • token-authenticated routes for command execution, package installs, jobs/logs, upload, and download

What To Upload

Upload/open this in Colab:

notebooks/hydra_personal_gpu_cluster.ipynb

notebooks/hydra_a100_cluster.ipynb is also the same cluster-only notebook for convenience.

Colab Setup

  1. Open the notebook in Google Colab.
  2. Select a GPU runtime.
  3. Add a Colab Secret named NGROK_AUTHTOKEN.
  4. Run the notebook top to bottom.
  5. Copy the printed HYDRA_CLUSTER_URL and HYDRA_CLUSTER_TOKEN.

The notebook prints:

HYDRA_CLUSTER_URL=https://...
HYDRA_CLUSTER_TOKEN=...
HYDRA_CLUSTER_DOCS_URL=https://.../docs
HYDRA_CLUSTER_OPENAPI_URL=https://.../openapi.json

Local Control

From this repo:

export HYDRA_CLUSTER_URL="https://your-ngrok-url"
export HYDRA_CLUSTER_TOKEN="printed-token"

python3 scripts/hydra_personal_cluster_client.py health
python3 scripts/hydra_personal_cluster_client.py status
python3 scripts/hydra_personal_cluster_client.py exec -- nvidia-smi
python3 scripts/hydra_personal_cluster_client.py exec -- python -m pip --version

Install from here:

python3 scripts/hydra_personal_cluster_client.py pip-install -- numpy==1.26.4 opencv-python-headless
python3 scripts/hydra_personal_cluster_client.py apt-install -- ffmpeg git
python3 scripts/hydra_personal_cluster_client.py packages --raw

Move files:

python3 scripts/hydra_personal_cluster_client.py files /content
python3 scripts/hydra_personal_cluster_client.py upload local.file /content/local.file
python3 scripts/hydra_personal_cluster_client.py download /content/remote.file outputs/remote.file

Run long jobs:

python3 scripts/hydra_personal_cluster_client.py exec --no-wait --timeout 7200 -- python train_or_infer.py
python3 scripts/hydra_personal_cluster_client.py jobs
python3 scripts/hydra_personal_cluster_client.py logs <job_id>

Routes

The notebook server exposes:

  • GET /health
  • GET /status
  • POST /exec
  • GET /jobs
  • GET /jobs/{job_id}
  • GET /logs/{job_id}
  • POST /files/upload
  • GET /files/download
  • GET /files/list

All routes require:

Authorization: Bearer <HYDRA_CLUSTER_TOKEN>

Treat the token like root access to the Colab runtime.

About

Autonomous mission control system capable of executing mission critical systems end to end.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages