Deploy on GCP
Run Laboratory OS on a Google Cloud Compute Engine VM with a GPU.
No inbound ports or firewall rules are needed — Laboratory OS uses an outbound tunnel. You can block all inbound traffic entirely.
1. Request GPU Quota
GCP requires quota before you can launch GPU VMs. In the Cloud Console, go to IAM & Admin → Quotas, search for your target GPU type (e.g., NVIDIA_T4_GPUS), and request an increase for your preferred region. Approval is usually instant for small quotas.
2. Create a VM
In the Compute Engine console, click Create Instance.
Under Machine configuration, click GPUs and choose a GPU.
Choosing a GPU: More VRAM lets you run larger models — 16 GB handles most image generation, 24-48 GB covers mid-size LLMs, and 100 GB+ is needed for large LLMs.
Boot disk:
- OS: Ubuntu 22.04 LTS
- Size: at least 100 GB (200+ GB recommended for models)
Firewall: No changes needed. The tunnel uses an outbound connection — no inbound rules are required.
3. Install Dependencies
SSH into the VM (use the SSH button in the console or gcloud compute ssh):
gcloud compute ssh <instance-name>
Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker
Verify:
docker run --rm hello-world
If you see “Hello from Docker!”, the installation was successful.
NVIDIA Drivers
Note: GCP's GPU-optimized OS images sometimes ship with NVIDIA drivers pre-installed. Run
nvidia-smifirst — if it works, skip this section.
sudo apt-get update
sudo apt-get install -y ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
sudo reboot
After reboot, confirm the driver is loaded:
nvidia-smi
You should see your GPU listed with its driver version and VRAM.
Troubleshooting: If nvidia-smi is not found after install, make sure you have rebooted — the reboot after ubuntu-drivers autoinstall is required. If you see a Driver/library version mismatch error, reboot to resync the driver and CUDA library versions.
NVIDIA Container Toolkit
# Add the NVIDIA package repository
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
# Install
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
# Configure Docker runtime and restart
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
Verify:
docker run --rm --gpus all nvidia/cuda:12.0-base-ubuntu22.04 nvidia-smi
If you see nvidia-smi output inside the container, everything is set up correctly.
Troubleshooting: If you see could not select device driver “nvidia”, run sudo nvidia-ctk runtime configure --runtime=docker followed by sudo systemctl restart docker. If the GPU is visible on the host but not inside the container, make sure you are passing --gpus all to docker run.
4. Run Laboratory OS
docker run --gpus all \
-e UPLINK_API_KEY='your-account-key' \
openlaboratoryorg/laboratory-os
Check the container logs for your assigned slug — it appears within the first 30 seconds. Then sign in to your account at:
https://app.laboratory.computerFrom there you'll see your running instance and can open the Laboratory OS desktop. Access is gated by your SSO login rather than a shared token, so only authenticated account holders can connect.
5. Cost Management
Stop the VM from the Cloud Console when not in use — compute billing pauses and the persistent disk is retained. Restart it and the container comes back up automatically if you used --restart unless-stopped.
Tip: Use Spot VMs for up to 91% cost savings. Spot VMs can be reclaimed by Google with 30 seconds notice — suitable for short tasks, not long unattended runs.