This is a Docker container that replicates the colab runtime environment, used to quickly launch a container that is almost identical to the colab environment, allowing for colab to connect to local GPUs for computation.
Notice: This image size is almost ~28GB, Please be careful to reserve network traffic and disk space.
docker run -it -d --gpus all --name colab -v content:/content -p 8888:8888 wsvn/colab-runtime-local:latest
Or, You can also build docker image from Dockerfile:
docker build . -t colab-runtime-local
The build process may take a long time. After that, start the container as described above.
After docker container started, you can get the full url or notebook token from logs or terminal.
Then, you can connect the local container by following the instructions of google colab.
It is possible that the computer with a graphics card you have installed is not the one currently running Colab. However, Colab only allows connections to be made to localhost, so you may need to map the remote port to a local port:
ssh -N -L 8888:localhost:8888 user@host
The following are some capabilities that may work in Google Colab but may not run locally:
- Mount Google Drive with: google.colab.drive
Tested the following colab notebooks on Ubuntu 22.05 host with Tesla T4:
If you encounter any issues while using it elsewhere, please submit an issue.
Apache License 2.0