Environments

View as Markdown

Every Brev instance provides a development environment with popular AI/ML tools ready to use. There is no manual setup required.

What’s Included

What’s preinstalled depends on your deployment mode:

ModeEnvironmentPreinstalled Software
VM ModeFull Ubuntu VMPython 3.10+, CUDA, Docker, NVIDIA Container Toolkit
Container ModeSingle Docker containerDepends on your base image.
Compose ModeMulti-container Docker ComposeDepends on service images.

Refer to Launchables for details on choosing the right deployment mode.

VM Mode Software

VM Mode instances include:

  • Languages: Python 3.10+ with pip (version configurable)
  • GPU Support: CUDA Toolkit, cuDNN, NVIDIA drivers
  • Containers: Docker, Docker Compose, NVIDIA Container Toolkit
  • Notebooks: JupyterLab (when enabled in configuration)

Container and Compose Modes

Preinstalled software depends on your base image. Common NVIDIA base images include PyTorch, TensorFlow, and TensorRT containers from NGC.

IDE Support
  • VS Code Remote SSH
  • Cursor
  • Windsurf
Development Tools
  • Git version control
  • SSH access
  • Brev CLI

CUDA and GPU Support

Brev preconfigures and optimizes NVIDIA drivers and CUDA for your GPU type. Verify GPU access with:

$# Quick check - GPU and CUDA availability
$nvidia-smi
$nvcc --version
$
$# Framework verification (requires PyTorch installed)
$pip install torch # if not using a PyTorch base image
$python3 -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
$python3 -c "import torch; print(f'GPU: {torch.cuda.get_device_name(0)}')"

Working Directory

Your default working directory is /home/ubuntu/workspace. This is where you should store all your work, as it persists across instance stops.

The default username is ubuntu for most providers. Your working directory path is /home/<username>/workspace.

$# Navigate to workspace
$cd /home/ubuntu/workspace
$
$# Clone your project
$git clone https://github.com/your/repo.git
$
$# Create a virtual environment
$python3 -m venv .venv
$source .venv/bin/activate

Customizing Your Environment

You have full control to install additional packages and configure the environment:

$# Navigate to workspace
$cd /home/ubuntu/workspace
$
$# Install Python packages
$pip install transformers accelerate
$
$# Install system packages
$sudo apt update && sudo apt install -y htop
$
$# Pull Docker images
$docker pull nvcr.io/nvidia/pytorch:24.01-py3

System packages and Docker images persist across instance stops. Create a setup script or Dockerfile for reproducibility.

What’s Next