Skip to main content
The examples on this page omit auth. To authenticate with your W&B API key, install cwsandbox[wandb] and pass auth=AuthStrategy.WANDB to Sandbox.run(), Sandbox(), or Sandbox.session(). See Get started.
볼륨은 샌드박스가 사용자가 지정한 경로에 마운트하는 저장소입니다. 스크래치 볼륨은 하나의 샌드박스에 속하며 해당 샌드박스와 함께 삭제됩니다. 이 페이지는 컨테이너 파일 시스템 용량을 초과하는 데이터를 샌드박스에서 써야 하는 개발자를 위한 문서입니다. 이 문서를 마치면 스크래치 볼륨을 연결할 수 있습니다.

Scratch volumes

A scratch volume is created with the sandbox and destroyed with it. Declare one with ScratchVolumeOptions in the volumes list.
ScratchVolumeOptions accepts the following fields:

Choose a storage medium

StorageMedium.DISK backs the volume with local disk. StorageMedium.MEMORY backs it with tmpfs, which is faster but counts against the mounting container’s memory request and against the policy’s memory ceiling. Because an unbounded RAM-backed volume could exhaust the node, a MEMORY volume must declare a size. It may do so as an absolute quantity, or as an integer percentage of the sandbox’s resolved memory request, such as "50%". The percentage form is valid only for MEMORY. A DISK volume must use an absolute size.

Mount a scratch volume on several containers

mount_path is a convenience that mounts the volume on the primary container. In a multi-container sandbox, omit mount_path and declare the mounts on each container instead, so that more than one container can reach the same volume.
For more on related sandbox features, see the following resources:
마지막 수정일 2026년 9월 30일