Instance ParametersΒΆ
Instance parameters are part of the configuration file, but for each provider they are different. Here you can find parameters for an AWS instance:
containerName
(optional) - a name of the container from thecontainers
section. Default value:default
.region
- AWS region where to run an instance (you can use commandspotty aws spot-prices
to find the cheapest region).availabilityZone
(optional) - AWS availability zone where to run an instance. If a zone is not specified, it will be chosen automatically.subnetId
(optional) - AWS subnet ID. If this parameter is set, the "availabilityZone" parameter should be set as well. If it's not specified, a default subnet will be used.instanceType
- a type of the instance to run. You can find more information about types of GPU instances here: Recommended GPU Instances.spotInstance
(optional) - if set totrue
, runs a Spot instance instead of an On-demand instance,amiName
(optional) - a name of the AMI with NVIDIA Docker (default value is "SpottyAMI"). Use thespotty aws create-ami
command to create it. This AMI will be used to run your application inside the Docker container.amiId
(optional) - ID of the AMI with NVIDIA Docker. This parameter can be used to run an instance using a shared Spotty AMI.maxPrice
(optional) - the maximum price per hour that you are willing to pay for a Spot Instance. By default, it's the On-demand price for the chosen instance type. Read more here: Spot Instances.rootVolumeSize
(optional) - size of the root volume in GB. The root volume will be destroyed once the instance is terminated. Use attached volumes to store the data you need to keep (see "volumes" parameter below).dockerDataRoot
(optional) - directory where Docker will store all downloaded and built images. Read more: Caching Docker Image on an EBS Volume.volumes
(optional) - the list of volumes to attach to the instance:name
- a name of the volume. This name should match one of the container'svolumeMounts
to have this volume attached to the container's filesystem.parameters
(optional) - parameters of the volume:type
(optional) - the volume type. Supported types: "gp2", "sc1", "st1" and "standard". The default value is "gp2". Read more here: Amazon EBS Volume Types.size
(optional) - size of the volume in GB. Size of the volume cannot be less than the size of the existing snapshot but can be increased.deletionPolicy
(optional) - what to do with the volume once the instance is terminated using thespotty stop
command. Possible values include: "Retain" (value by default), "CreateSnapshot", "UpdateSnapshot" and "Delete". Read more here: EBS Volumes and Deletion Policies.volumeName
(optional) - name of the EBS volume. The default name is "{project_name}-{instance_name}-{volume_name}".mountDir
(optional) - directory where the volume will be mounted on the instance. The default directory is "/mnt/{ebs_volume_name}".
ports
(optional) - list of ports to open on the instance. For example:ports: [6006, 8888]
It will open ports 6006 for TensorBoard and 8888 for Jupyter Notebook.
localSshPort
(optional) - if this parameter is set, all the Spotty commands will create SSH connections with the instance using the IP address 127.0.0.1 and the specified port. This can be useful in case when an instance doesn't have a public IP address and a jump-server is used for tunneling.managedPolicyArns
(optional) - a list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the instance role. Read more about Managed Policies here.instanceProfileArn
(optional) - an Amazon Resource Name (ARN) of the IAM Instance Profile that you'd like to attach to the instance. Read more about Instance Profiles here.commands
(optional) - commands that should be run on the host OS before the container is started. For example, you could login to Amazon ECR to pull a Docker image from there (Deep Learning Containers Images):commands: | $(aws ecr get-login --no-include-email --region us-east-2 --registry-ids 763104351884)