Quick Job Execution with astral/uv:latest
To run Python workloads rapidly without authoring a custom Dockerfile or writing a full workload YAML definition, you can use the official astral/uv:latest image. Combined with uv's dynamic dependency injection (uv run --with <package>), you can execute arbitrary Python scripts with ad-hoc dependencies directly from the command line.
Example Command
solti job run --image astral/uv:latest \
--env-from-file .env \
--volume my-ml-datasets/some/prefix:/mnt/r2 \
--resources cpu=4,memory=16Gi,gpu=24Gi \
--label environment=production \
--tag quick-job \
uv run --with numpy --with pandas --with torch python -c "$(echo 'your_script.py')"
Key Capabilities & Mechanics
If solti job run does not include explicit --command or --args flags, any trailing arguments following the command options are automatically passed as the container's command and args. In the example above, uv is executed as the primary command, and ["run", "--with", "numpy", "--with", "pandas", "--with", "torch", "python", "-c", "..."] are passed as its arguments.
The syntax --volume my-ml-datasets/some/prefix:/mnt/r2 is a concise shorthand for --volume name=my-ml-datasets,connection=my-r2-storage,bucket=my-ml-datasets,prefix=some/prefix,mountPath=/mnt/r2. Solti automatically resolves the bucket name, path prefix, and matching cloud storage credentials.
Using --env-from-file .env parses key-value pairs from your local .env file and securely injects them as container environment variables without exposing sensitive tokens on the command line.