Spotml Config file
SpotML needs a spotml.yaml
configuration file in the root folder. An example configuration file looks like below:
Project Parameters
name
Name of the project, this name is used as a prefix in all the aws resources created.
maxIdleMinutes
Maximum idle time before which instance must automatically be shut down. Set this to 0
to turn off idle time checking.
SpotML periodically(every 5 mins) checks instances for idle time. It track them by checking if the docker instance has any active running commands or if there was any tty(keyboard) activity. If it finds no activity and no running commands for more than maxIdleMinutes it terminates the instance.
syncFilters (optional)
By default SpotML syncs all the files/folders in the project directory. You can use this to exclude files you don't want to sync to instance
Container Parameters
image
Specify the docker image to use to launch the container. This works for simple cases where you don't need a custom Dockerfile with anything else installed.
file (if above image is not specified)
When you need a custom Dockerfile, to customize the instance. Specify the path to the Dockerfile.
env
Environment variables available in the container
ports
Ports that should be exposed in the container and the host instance so that you can access apps like jupyter notebook from your browser.
Instance Parameters
name
An identifier for the aws resources created. This name is used as a prefix in all the aws resources created.
provider
Right now we only support aws
as the provider
parameters
region - The aws region to create resources.
instanceType - The aws instance type to launch
spotStrategy - Options for this is either on-demand
or spot
.
on-demand
- Launch an aws on demand instancespot
- Launch a spot instance only.
ports - Ports to be exposed in the aws instance.
rootVolumeSize - The size(GB) of the root EBS volume attached to instance. This will be destroyed after instance terminates
volumes - The persistent EBS volumes that are to be attached to the instance. These will not be destroyed after instance terminates. These are re-attached the next time the instance starts and the data is preserved.
Script Parameters
This section has script configurations that are used in the sptoML managed runs.
Last updated