The image
key defines the type of image on which to run your code
Introduced in v0.0.5
, the image configuration option gives you the ability to run your
code in a custom image within their infrastructure’s environment. For example, you can
run their code on a Docker image within their EC2 instance.
Great question! After all, agents are already their own execution environment — what’s the additional benefit of using images? There are a few:
The image
key accepts the following keys:
type
: the image type. As of now, the supported types are: docker
base
: the base image upon which to build your custom image. This cannot be specified
alongside context
.context
: path to the image context to use to build the image (e.g., the image
Dockerfile). If this is specified, then all other image build parameters are ignored.
This cannot be specified alongside base
.base
and context
are mutually exclusive. If base
is specified, then Alto
will build your context (e.g., your Dockerfile) for you. Otherwise, Alto will rely on
the context at the path you provideimage_build_cmds
: custom commands to run when building your image (e.g., apt ...
).registry
: the registry in which to push your image. As of now, the supported types
are: dockerhub
and ecr
. If not specified, then defaults to ecr
.registry_creds
: credentials for your chosen registry as nested key-value pairs:
username
: your registry usernamepassword
: your registry passwordregistry_creds
are not specified, then Alto will try to infer them or will prompt you for them.Here’s a simple configuration for a Docker image on an EC2 agent:
The image
key defines the type of image on which to run your code
Introduced in v0.0.5
, the image configuration option gives you the ability to run your
code in a custom image within their infrastructure’s environment. For example, you can
run their code on a Docker image within their EC2 instance.
Great question! After all, agents are already their own execution environment — what’s the additional benefit of using images? There are a few:
The image
key accepts the following keys:
type
: the image type. As of now, the supported types are: docker
base
: the base image upon which to build your custom image. This cannot be specified
alongside context
.context
: path to the image context to use to build the image (e.g., the image
Dockerfile). If this is specified, then all other image build parameters are ignored.
This cannot be specified alongside base
.base
and context
are mutually exclusive. If base
is specified, then Alto
will build your context (e.g., your Dockerfile) for you. Otherwise, Alto will rely on
the context at the path you provideimage_build_cmds
: custom commands to run when building your image (e.g., apt ...
).registry
: the registry in which to push your image. As of now, the supported types
are: dockerhub
and ecr
. If not specified, then defaults to ecr
.registry_creds
: credentials for your chosen registry as nested key-value pairs:
username
: your registry usernamepassword
: your registry passwordregistry_creds
are not specified, then Alto will try to infer them or will prompt you for them.Here’s a simple configuration for a Docker image on an EC2 agent: