CLI Jobs#
Run simple commands and scripts in the cloud
Sometimes you just want to run a simple script on a VM in the cloud. This is common for different reasons:
You want to run close to your data
You want a GPU
You want a bigger machine
You want to run the script many times while scaling out
This is easy with the coiled run
command. Coiled will run your command on
the infrastructure of your choosing.
coiled run python my_script.py
coiled run bash my_bash_script.sh
coiled run --gpu python pytorch_model_train.py
coiled run --vm-type m6i.32xlarge python parallel_script.py
for i in {1..10};
do coiled run python my_script.py --param $i &
done
Features#
Coiled Run benefits from the standard Coiled features:
Easy to use API
Creates and manages VMs for you in the cloud
Automatically synchronizes your local software and credentials
Gives access to any cloud hardware (like GPUs) in any region
Hardware#
It’s easy to customize the hardware and software resources a run needs. You can select any VM type available on your cloud (see VM Size and Type). For example:
# 128 Cores and 512 GB of RAM
coiled run --vm-type m6i.32xlarge python myscript.py
# A single T4 NVIDIA GPU
coiled run --vm-type g4dn.xlarge python train.py
Software for Coiled Run will work the same as with Coiled clusters. By default, Coiled will automatically synchronize your local software environment. This works well in most cases, but you can also specify an manual software environment or Docker image:
# Manual software environment
coiled run --software my-env python my_script.py
# Docker image
coiled run --container nvcr.io/nvidia/rapidsai/base:23.08-cuda11.8-py3.10 python rapids_script.py
Files#
Any files listed in your command will automatically be uploaded to the cloud
for your run to complete. If additional files are needed (for example, your Python
script imports code from another local Python module) you can use the
--file
option to ensure additional files are also included with your run.
coiled run --file utils.py python my_script.py
Examples#
Feedback#
Coiled Run is under active development. We highly
value feedback from users and encourage you to play with coiled run
and then let us know about your experience on
this issue tracker
or by reaching out to support@coiled.io.
API#
coiled run#
Run a command on the cloud.
coiled run [OPTIONS] [COMMAND]...
Options
- --name <name>#
Run name. If not given, defaults to a unique name.
- --account <account>#
Coiled account (uses default account if not specified)
- --software <software>#
Software environment name to use. If neither software nor container is specified, all the currently-installed Python packages are replicated on the VM using package sync.
- --container <container>#
Container image to use. If neither software nor container is specified, all the currently-installed Python packages are replicated on the VM using package sync.
- --vm-type <vm_type>#
VM type to use. Specify multiple times to provide multiple options.
- --gpu#
Have a GPU available.
- --region <region>#
The cloud provider region in which to run the notebook.
- --disk-size <disk_size>#
Use larger-than-default disk on VM, specified in GiB.
- --keepalive <keepalive>#
Keep your VM running for the specified time, even after your command completes. Default to shutdown immediately.
- -f, --file <file>#
Local files required to run command.
Arguments
- COMMAND#
Optional argument(s)