DocsManage Files and Artifacts
v1.16+

Manage Files and Artifacts

Sandbox file commands inspect and transfer files in the running container. The quick start creates /workspace as scratch space; uploading a file there does not add it to Polyaxon's artifact store.

This page uses the quick-start project and RUN_UUID variable established by that guide.

List Files

polyaxon sandbox ls -p quick-start -uid $RUN_UUID /workspace

List recursively when needed:

polyaxon sandbox ls -p quick-start -uid $RUN_UUID /workspace --recursive

Upload Files

polyaxon sandbox upload -p quick-start -uid $RUN_UUID ./local.txt /workspace/local.txt

Download Files

polyaxon sandbox download -p quick-start -uid $RUN_UUID /workspace/results.json ./results.json

Preserve Outputs

Files under /workspace may disappear when the run is stopped or replaced. For durable results, write them under the path returned by tracking.get_outputs_path(). Polyaxon syncs that run output directory to the configured artifact store.

For tracking artifacts from Python code, see tracking artifacts.

File Transfer Guidance

  • Use sandbox upload and download for small targeted files.
  • Use SSH-based tools such as SFTP or SCP for larger interactive transfer workflows. You can also use rsync when the container image includes it.
  • Use tracking.get_outputs_path() for model files, reports, checkpoints, and generated datasets that Polyaxon should retain.