# Overview

> Keep datasets, models and checkpoints safe across instances and Run Jobs.

Every instance and Run Job has a **container disk**: its own temporary disk, erased when it stops. **Network volumes** are persistent storage you create separately and mount into instances and Run Jobs. Where you put a file decides whether it survives a stop and what you pay for it.

Use network volumes to:

- keep datasets and model weights in one place and mount them into every instance and Run Job that needs them;
- save checkpoints, so a training run that's interrupted or stopped can resume;
- cache model downloads, so the next start skips the download;
- share code and results between an instance you develop on and the Run Jobs you launch from it.

## Get started

<card-group>
<card icon="i-lucide-database" title="Network volumes" to="/storage/network-volumes">

Create, mount, resize and delete volumes.

</card>

<card icon="i-lucide-folder-up" title="Transfer files" to="/storage/transfer-files">

Upload and download files from the console or the CLI.

</card>
</card-group>

## Compare storage types

<table>
<thead>
  <tr>
    <th>
      
    </th>
    
    <th>
      Container disk
    </th>
    
    <th>
      Network volume
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Survives a stop or restart
      </strong>
    </td>
    
    <td>
      No
    </td>
    
    <td>
      Yes
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Survives deleting the instance
      </strong>
    </td>
    
    <td>
      No
    </td>
    
    <td>
      Yes, until you delete the volume
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Where it appears
      </strong>
    </td>
    
    <td>
      The whole filesystem, including <code>
        /workspace
      </code>
    </td>
    
    <td>
      The path you mount it at, such as <code>
        /workspace
      </code>
      
       or <code>
        /data
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Size
      </strong>
    </td>
    
    <td>
      20–2,000 GiB
    </td>
    
    <td>
      Up to 10,240 GiB
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Resize
      </strong>
    </td>
    
    <td>
      When you edit the instance, which restarts it
    </td>
    
    <td>
      Grow at any time, even while mounted; it can't shrink
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Shared
      </strong>
    </td>
    
    <td>
      No
    </td>
    
    <td>
      Several instances and Run Jobs can mount it at once
    </td>
  </tr>
</tbody>
</table>

## Container disk

The container disk holds the image, everything you install with `pip` or `apt`, and every file outside a network volume's mount path, including `/workspace` when no volume is mounted there. Besides a stop, it's erased by a restart, including the one that applies an edit, and when a Run Job ends.

The terminal's welcome banner shows how much of the container disk is in use. Size it for the image, your packages and scratch files; anything you want to keep belongs on a volume.

## Network volumes

A network volume lives outside any instance. Mount it when you deploy an instance or submit a Run Job; it can't be added to or removed from an existing instance. An instance or Run Job that mounts a volume runs in the volume's location.

Common ways to mount one:

- **At /workspace:** your whole working directory survives stops. This is the simplest setup for development.
- **At /data or another path:** datasets and models persist, while `/workspace` stays on the container disk for scratch work.
- **For model downloads:** set `HF_HOME` to a folder on the volume, such as `/workspace/hf`, so Hugging Face models download once and every later instance or Run Job reuses them.

Several instances and Run Jobs can read the same volume at once. Avoid writing the same file from two of them at the same time; give each its own output folder.

You can upload, download and organize a volume's files from the console or the CLI without starting an instance. See [Transfer files](/storage/transfer-files).

Deleting a volume erases its data and can't be undone. Keep a copy of data you can't recreate.

## Choose where to keep each file

<table>
<thead>
  <tr>
    <th>
      File
    </th>
    
    <th>
      Where
    </th>
    
    <th>
      Why
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Datasets and model weights
    </td>
    
    <td>
      Network volume
    </td>
    
    <td>
      Reused by every run without downloading again
    </td>
  </tr>
  
  <tr>
    <td>
      Checkpoints and results
    </td>
    
    <td>
      Network volume
    </td>
    
    <td>
      Survive stops, interruptions and deleting the instance
    </td>
  </tr>
  
  <tr>
    <td>
      Hugging Face cache
    </td>
    
    <td>
      Network volume, through <code>
        HF_HOME
      </code>
    </td>
    
    <td>
      Models download once
    </td>
  </tr>
  
  <tr>
    <td>
      Code
    </td>
    
    <td>
      Network volume, or a Git repository you clone at start
    </td>
    
    <td>
      Survives stops
    </td>
  </tr>
  
  <tr>
    <td>
      Python packages
    </td>
    
    <td>
      Container disk
    </td>
    
    <td>
      Reinstall after a stop; keep a <code>
        requirements.txt
      </code>
      
       on the volume so it's one command: <code>
        pip install -r /workspace/requirements.txt
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Temporary and scratch files
    </td>
    
    <td>
      Container disk
    </td>
    
    <td>
      Erased for you when the instance stops
    </td>
  </tr>
</tbody>
</table>

## How storage is billed

The container disk bills per second while the container runs, as part of the instance or Run Job, and stops billing when it stops.

Network volumes bill for their full capacity per second for as long as they exist, whether or not anything mounts them and how much of them is used. They keep billing when your balance reaches zero. Delete volumes you no longer need. See [Billing](/account/billing).

## Next steps

<card-group>
<card icon="i-lucide-database" title="Network volumes" to="/storage/network-volumes">

Create a volume and mount it.

</card>

<card icon="i-lucide-notebook-pen" title="Develop in JupyterLab" to="/examples/jupyterlab">

Keep notebooks on a volume across stops.

</card>
</card-group>
