Compute Resources
A computation—whether a Reproducible Run or a Cloud Workstation session—runs as a Docker container occupying a compute slot on an EC2 instance in AWS. The instance type is determined by the Starter Environment you select, and will support either a general-purpose machine or one with GPU resources.
After selecting the Starter Environment, adjust the compute resources by choosing the number of slots to allocate for your computation. The default compute resource is based on the machine type of the starter environment.
Setting Compute Resources
From the Environment editor, click Select Compute Resources.
Select the allocation type.
Select the number of slots or specific instance type.
Click Apply.

Methods of Allocating Compute Resources
A Capsule allocates compute resources in two ways:
Flex
Dedicated
Flex Machine
Flex resources are the default option for running your Capsule. This method attempts to allocate the selected compute resource (slots) on a running worker machine in the deployment's fleet of workers. If none of them have enough available slots, a new machine is added to the fleet in order to meet the need. This allows low-intensity computations to run on the same EC2 instances to reduce the cost by avoiding turning on an additional instance.
Using flex resources ensures your organization gets the most value out of running machines in your deployment. When all slots become empty, i.e. there are no computations running on the EC2 instance, the EC2 instance will remain immediately available for computations for a short period of time then automatically shutdown. The period of time an unused flex worker will remain available before automatically shutting down is configured during initial deployment or upgrade, and the default time is 1 hour.
Dedicated Machine
Selecting a Dedicated Machine launches a new Amazon EC2 instance exclusively for your computation. Use a Dedicated Machine when you have a computation with high compute demand or need an EC2 instance with a specific resource configuration. Dedicated Machines are available in a wide range of specifications, with machines ranging from 1 to 384 vCPUs and from 0.5 to 4096 GB RAM. Each machine's description includes a resource summary with its GPU count, GPU RAM, CPU cores, and RAM so you can quickly find the right fit for your workload.

Instances typically take around two minutes to start, though startup time may vary. By default, Dedicated Machines are launched as On-Demand instances, meaning you reserve the full instance at the standard hourly rate. The more powerful the instance, the higher the hourly cost (see AWS EC2 pricing website for more details). Once your computation is complete (your Reproducible Run has finished or your Cloud Workstation session is paused or closed), the instance shuts down automatically.
Spot Instances
To run a Dedicated Machine as a spot instance, check Use as spot instance when selecting your machine. Spot instances run on unused EC2 capacity at a discount of up to 90% for certain instance types compared to On-Demand rates. Because the capacity is not reserved, AWS may reclaim it without notice, which will interrupt your computation. Use spot instances for fault-tolerant or flexible workloads where cost savings outweigh the risk of interruption.
Provisioning sufficient resources
To determine if your capsule needs higher compute resources, you can monitor usage and RAM metrics in two ways:
At the top of your screen when in a Cloud Workstation

2. In the Capsule Timeline after a Reproducible Run

If your computation exceeds the resources you’ve allocated in a Cloud Workstation, you will get an error message such as:
If your computation exceeds allocated resources during a Reproducible Run, it will terminate abruptly. If there are no flex machines with more resources, you should use a dedicated machine. Start by slowly increasing the memory and cores of your dedicated machine depending on your use case.
User Interface Feedback
If a compute resources is no longer available, the system displays a notification on the screen.

Was this helpful?