bash provider runs given shell commands.
It comes with Python and Conda pre-installed, and allows to expose ports.
If GPU is requested, the provider pre-installs the CUDA driver too.
workflows: - name: "train" provider: bash deps: - tag: some_tag python: 3.10 commands: - pip install requirements.txt - python src/train.py artifacts: - path: checkpoint resources: interruptible: true gpu: 1
The following properties are required:
commands- (Required) The shell commands to run
The following properties are optional:
before_run- (Optional) The list of shell commands to run before running the main commands
requirements- (Optional) The path to the
python- (Optional) The major version of Python. By default, it's
env- (Optional) The list of environment variables
artifacts- (Optional) The list of output artifacts
resources- (Optional) The hardware resources required by the workflow
working_dir- (Optional) The path to the working directory
The list of output artifacts
path– (Required) The relative path of the folder that must be saved as an output artifact
trueif the artifact files must be saved in real-time. Must be used only when real-time access to the artifacts is important. For example, for storing checkpoints when interruptible instances are used, or for storing event files in real-time (e.g. TensorBoard event files.) By default, it's
The hardware resources required by the workflow
cpu- (Optional) The number of CPU cores
memory(Optional) The size of RAM memory, e.g.
gpu- (Optional) The number of GPUs, their model name and memory
shm_size- (Optional) The size of shared memory, e.g.
trueif the instance must be spot/preemptive. By default, it's
If your workflow is using parallel communicating processes (e.g. dataloaders in PyTorch),
you may need to configure the size of the shared memory (
/dev/shm filesystem) via the
The number of GPUs, their name and memory
count- (Optional) The number of GPUs
memory(Optional) The size of GPU memory, e.g.
name(Optional) The name of the GPU model (e.g.
If you'd like your workflow to expose ports, you have to specify the
ports property with the number
of ports to expose. Actual ports will be assigned on startup and passed to the workflow via the environment
workflows: - name: app provider: bash ports: 1 commands: - pip install -r requirements.txt - gunicorn main:app --bind 0.0.0.0:$PORT_0