Skip to main content
Train mounts cloud storage into your container before the job starts. On Vertex AI and Azure ML it also sets STORAGE_MOUNT_0_PATH, STORAGE_MOUNT_1_PATH, etc. as environment variables. Your training script reads from these paths, with no cloud-specific SDKs or storage code needed.

Mount Configuration

Each entry in storage_mounts maps a cloud URI to a container path:
Inside the container on Vertex AI, each variable holds the Cloud Storage FUSE path of its source_uri:
Mounts are indexed in order, starting at zero. Each backend handles a mount differently:

URI Formats

On Azure ML, source_uri can be an azureml:// datastore URI, a wasbs:// or abfss:// URI, or an https:// URI on *.blob.core.windows.net or *.dfs.core.windows.net. Train skips mounts with any other URI and submits the job without them. Datastores are configured in your Azure ML workspace.
Train rejects a job with 403 if its storage_mounts reference storage your account isn’t allowed to use. By default, jobs can use only your deployment’s Train storage:
  • AWS and GCP: the Train data, checkpoints, output, and staging buckets
  • Azure: the traindata, traincheckpoints, and trainoutput datastores, which point to the data, checkpoints, and output containers of the training storage account
Ask your Scale team for your Train bucket names, or to allow other storage for your account.

Accessing Mounts in Your Container

This works on Vertex AI and Azure ML. SageMaker does not set STORAGE_MOUNT_* variables; read inputs from /opt/ml/input/data/ instead.

Read vs. Write

Set read_only based on intent. Use true for input data and pretrained weights; false for outputs, checkpoints, and logs. Marking input mounts read-only prevents accidental writes and may improve performance on some backends.

SageMaker: Input Data Config

SageMaker also supports input_data_config for S3 input channels. Channels are downloaded to the instance before training starts, which can be faster for large datasets with random access patterns:
SageMaker makes this available at /opt/ml/input/data/train/. This coexists with storage_mounts.

Next Steps