colab
Command-line interface for Google Colab. tldr-pages
On several platforms
Several platforms
Command-line interface for Google Colab. Some subcommands such as run and exec have their own usage documentation.
Allocate a new named session with a specific GPU
colab new --session session_name --gpu T4IdentifyList all active sessions
colab sessionsIdentifyRun a local script on a fresh GPU VM and automatically release it upon completion
colab run --gpu T4 path/to/script.pyIdentifyExecute a local Python script or Jupyter notebook in a specific session
colab exec --session session_name --file path/to/file.pyIdentifyConnect to an interactive TTY shell on the remote VM
colab console --session session_nameIdentifyMount Google Drive in a specific session
colab drivemount --session session_nameIdentifyDownload a file from the remote session
colab download --session session_name path/to/remote_file path/to/local_destinationIdentifyStop and terminate a specific session
colab stop --session session_nameIdentify