Coder - Cloud Development Environments
Coder is a self-hosted platform for deploying cloud development environments. It enables LBNL researchers to run VS Code, JetBrains IDEs, and AI coding agents in secure, network-isolated containers on Berkelium’s Kubernetes infrastructure.
Why Use Coder on Berkelium?
Section titled “Why Use Coder on Berkelium?”- Self-Hosted Security: Your code and data never leave the Berkelium cluster — critical for compliance-sensitive research
- AI-Native Development: Run AI coding agents (Cursor, Devin Desktop, GitHub Copilot) with centralized governance and audit trails
- Consistent Environments: Template-based workspaces ensure reproducible development setups across your research team
- GPU Acceleration: Access NVIDIA H100, A100, and L40S GPUs directly from your cloud IDE
- Network Isolation: Enforce zero-trust networking policies between workspaces and external resources
Quick Start
Section titled “Quick Start”1. Request a Coder Workspace
Section titled “1. Request a Coder Workspace”Visit the Coder Portal and authenticate with your LBNL OneID.
2. Choose a Workspace Template
Section titled “2. Choose a Workspace Template”Coder offers pre-configured templates for common research workflows:
| Template | CPU | GPU | Memory | Use Case |
|---|---|---|---|---|
| Standard Dev | 4 cores | None | 16GB | General Python/R development |
| Data Science GPU | 8 cores | A100 (40GB) | 64GB | ML model training, JupyterLab |
| LLM Research | 16 cores | H100 (80GB) | 128GB | Large language model fine-tuning |
| Vision Workloads | 12 cores | L40S (48GB) | 96GB | Computer vision, image processing |
3. Connect Your IDE
Section titled “3. Connect Your IDE”Once your workspace is running:
VS Code (Recommended):
# Install Coder CLIcurl -L https://coder.com/install.sh | sh
# Connect to your workspacecoder code-server <workspace-name>JetBrains IDEs:
- Open your JetBrains IDE (IntelliJ, PyCharm, CLion)
- Install the Coder Gateway plugin
- Connect to
https://coder.berkelium.lbl.gov - Select your workspace and launch
Browser-Based:
- Access VS Code directly at
https://coder.berkelium.lbl.gov/workspace/<name> - Full terminal, file explorer, and extension support
Advanced Usage
Section titled “Advanced Usage”Custom Workspace Templates
Section titled “Custom Workspace Templates”Create custom templates for your research group by defining a .coder/coder.yaml file in your repository:
workspace: name: my-research-env image: ghcr.io/my-lab/custom-ml-image:latest resources: cpu: 16 memory: 64Gi gpu: nvidia.com/gpu=1 mounts: - source: pvc/my-datasets destination: /home/coder/datasets read_only: false ports: - port: 8888 # JupyterLab expose: true - port: 6006 # TensorBoard expose: trueAI Agent Governance
Section titled “AI Agent Governance”Coder provides centralized control over AI coding assistants:
- Audit Logs: Track all AI tool invocations and code suggestions
- Policy Enforcement: Block or allow specific AI models based on data sensitivity
- Network Controls: Restrict AI agents from accessing external APIs or datasets
- Cost Monitoring: Monitor token usage and API costs across your team
Persistent Storage
Section titled “Persistent Storage”Mount CephFS persistent volumes to retain your work across sessions:
# In your workspace terminalkubectl patch workspace <workspace-name> -n sci-myproject --type='json' \ -p='[{"op": "add", "path": "/spec/volumes/-", "value": { "name": "home-storage", "persistentVolumeClaim": {"claimName": "my-home-pvc"} }}]'Best Practices
Section titled “Best Practices”-
Stop Idle Workspaces: Coder workspaces consume GPU/CPU resources even when idle. Stop them when not in use:
Terminal window coder stop <workspace-name> -
Use Templates: Standardize environments across your team using workspace templates for reproducibility.
-
Mount Persistent Storage: Always mount a PVC for your home directory and datasets to avoid data loss.
-
Leverage AI Governance: For sensitive research code, enable AI governance policies to control model access.
-
Port Forwarding: For web applications running in your workspace:
Terminal window coder port-forward <workspace-name> 8080:8080
Troubleshooting
Section titled “Troubleshooting”Workspace Won’t Start
Section titled “Workspace Won’t Start”- Check resource quotas:
kubectl describe quota -n sci-myproject - Verify GPU availability:
kubectl describe nodes | grep -A 5 "Allocated resources" - Review workspace logs:
coder logs <workspace-name>
IDE Connection Issues
Section titled “IDE Connection Issues”- Ensure your Coder CLI is up to date:
coder version - Check network connectivity:
coder ping <workspace-name> - Restart the code-server:
coder restart <workspace-name>
GPU Not Detected
Section titled “GPU Not Detected”- Verify GPU resource requests in your template
- Check NVIDIA device plugin:
kubectl get pods -n kube-system | grep nvidia - Restart workspace with GPU flag:
coder start <workspace-name> --gpu
Resources
Section titled “Resources”- Coder Documentation — Official guides and API reference
- Coder Portal — Launch and manage workspaces
- Workspace Templates Repository — Community-contributed templates
- Slack: #coder-users — Get help from other researchers
Need Help?
Section titled “Need Help?”- Office Hours: Tuesday & Thursday, 11am – 12pm PT (Zoom link in Slack)
- Slack:
#coder-userson the LBNL workspace - Help Desk: Submit a ticket for Coder-specific issues
