> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up a Persistent Dev Environment

> Use volumes to persist code, data, and configurations across GPU instance restarts.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

GPU instances are ephemeral — delete one and the data goes with it. Use storage volumes to persist code, datasets, and model weights across deploys. Pay for compute only when you need it.

## 1. Create a storage volume

```bash theme={"theme":"github-dark"}
runcrate volumes create --name dev-workspace --size 100
runcrate volumes regions     # Check available regions
```

## 2. Deploy with the volume attached

```bash theme={"theme":"github-dark"}
runcrate instances create --name devbox --gpu RTX4090 --template ubuntu-devbox --storage dev-workspace
runcrate instances status devbox
```

The volume is mounted at `/workspace/`.

## 3. Set up your environment

```bash theme={"theme":"github-dark"}
runcrate ssh devbox -- "cd /workspace && git clone https://github.com/you/your-project.git"
runcrate ssh devbox -- "cd /workspace/your-project && pip install -r requirements.txt"
```

Store model weights on the volume to avoid re-downloading:

```bash theme={"theme":"github-dark"}
runcrate ssh devbox -- "mkdir -p /workspace/models"
runcrate ssh devbox -- "huggingface-cli download meta-llama/Llama-3.1-8B-Instruct \
  --local-dir /workspace/models/llama-8b"
```

## 4. Upload and download files

```bash theme={"theme":"github-dark"}
runcrate cp ./data.csv devbox:/workspace/your-project/
runcrate cp devbox:/workspace/your-project/output/ ./results/
```

## 5. Tear down (data persists)

```bash theme={"theme":"github-dark"}
runcrate instances delete devbox
```

## 6. Resume later

```bash theme={"theme":"github-dark"}
runcrate instances create --name devbox --gpu RTX4090 --template ubuntu-devbox --storage dev-workspace
```

Your code, models, and data are exactly where you left them at `/workspace/`.

## Manage volumes

```bash theme={"theme":"github-dark"}
runcrate volumes list
runcrate volumes resize <volume-id> --size 200
runcrate volumes delete <volume-id>
```

## Tips

* Keep model weights on the volume — a 70B model takes 30+ minutes to download but loads from the volume in seconds.
* The `ubuntu-devbox` template includes CUDA, Python, git, and common CLI tools.
* Volumes are billed separately from instances — check `runcrate billing usage` for a breakdown.
* Use `runcrate billing balance` to check credits before deploying.

## Cleanup

```bash theme={"theme":"github-dark"}
runcrate instances delete devbox
runcrate volumes delete <volume-id>    # Only when you no longer need the data
```
