CLI
Options:
-v, --version
Current anyscale version.--json
Return output as json, for use with --version.--help
Show this message and exit.
Commands:
auth
Configure the Anyscale authentication credentialscloud
Configure cloud provider authentication for Anyscale.cluster
Interact with clusters on Anyscale.cluster-compute
Manage cluster compute configurations on Anyscale.cluster-env
Interact with cluster environments.job
Interact with production jobs running on Anyscale.migrate
Manages configurations such as cluster environments...project
Manage projects on Anyscale.schedule
Create and manage Anyscale Schedules.service
Interact with production services running on Anyscale.version
Display version of the anyscale CLI.
anyscale auth
Configure the Anyscale authentication credentials
Options:
--help
Show this message and exit.
Commands:
fix
Fix the permission of the existing credentials fileremove
Remove the current credentials fileset
Set up credentials and save it to a fileshow
Show the information of the authenticated user using credentials
anyscale auth fix
Fix the permission of the existing credentials file
Options:
--help
Show this message and exit.
anyscale auth remove
Remove the current credentials file
Options:
--help
Show this message and exit.
anyscale auth set
Set up credentials and save it to a file
Options:
--help
Show this message and exit.
anyscale auth show
Show the information of the authenticated user using credentials
Options:
--help
Show this message and exit.
anyscale cloud
Configure cloud provider authentication and setup to allow Anyscale to launch instances in your account.
Options:
--help
Show this message and exit.
Commands:
config
Manage the configuration for a cloud.delete
Delete a cloud.list
List information about clouds in your Anyscale organization.register
Register an anyscale cloud with your own resources.set-default
Sets default cloud for your organization.setup
Set up a cloud provider.verify
Checks the healthiness of a cloud.
anyscale cloud config
Manage the configuration for a cloud.
Options:
--help
Show this message and exit.
Commands:
get
Get the current configuration for a cloud.update
Update the configuration for a cloud.
anyscale cloud config get
Get the current configuration for a cloud.
Options:
-n, --name TEXT
Update configuration of cloud by name.--cloud-id, --id TEXT
Cloud id to get details about. Alternative to cloud name.--help
Show this message and exit.
anyscale cloud config update
Update the configuration for a cloud.
Options:
--cloud-id, --id TEXT
Cloud id to update. Alternative to cloud name.-n, --name TEXT
Update configuration of cloud by name.--max-stopped-instances TEXT
Maximum number of stopped instances permitted in the shared instance pool. [required]--help
Show this message and exit.
anyscale cloud delete
Delete a cloud.
Options:
-n, --name TEXT
Delete cloud by name.--cloud-id, --id TEXT
Cloud id to delete. Alternative to cloud name.-y, --yes
Don't ask for confirmation.--help
Show this message and exit.
anyscale cloud list
List information about clouds in your Anyscale organization.
Options:
-n, --name TEXT
Name of cloud to get information about.--cloud-id, --id TEXT
Id of cloud to get information about.--help
Show this message and exit.
anyscale cloud register
Register an anyscale cloud with your own resources.
Options:
--provider [aws|gcp]
The cloud provider type. [required]--region TEXT
Region to set up the credentials in. [required]-n, --name TEXT
Name of the cloud. [required]--vpc-id TEXT
The ID of the VPC.--subnet-ids TEXT
Comma separated list of subnet ids.--efs-id TEXT
The EFS ID.--anyscale-iam-role-id TEXT
The Anyscale IAM Role ARN.--instance-iam-role-id TEXT
The instance IAM role ARN.--security-group-ids TEXT
IDs of the security groups.--s3-bucket-id TEXT
S3 bucket ID.--help
Show this message and exit.
anyscale cloud set-default
Sets default cloud for your organization. This operation can only be performed by organization admins, and the default cloud must have organization level permissions.
Options:
-n, --name TEXT
Set cloud as default by name.--cloud-id, --id TEXT
Cloud id to set as default. Alternative to cloud name.--help
Show this message and exit.
anyscale cloud setup
Set up a cloud provider.
Options:
--provider [aws|gcp]
The cloud provider type. [required]--region TEXT
Region to set up the credentials in. [required]-n, --name TEXT
Name of the cloud. [required]-y, --yes
Don't ask for confirmation.--gcp-folder-id INTEGER
Folder ID where the 'Anyscale' folder will be created.--vpc-peering-ip-range TEXT
IP range for VPC peering.--vpc-peering-target-project-id TEXT
Project ID of the target VPC.--vpc-peering-target-vpc-id TEXT
VPC ID of the target VPC.--help
Show this message and exit.
anyscale cloud verify
Checks the healthiness of a cloud.
Options:
-n, --name TEXT
Verify cloud by name.--cloud-id, --id TEXT
Verify cloud by cloud id, alternative to cloud name.--help
Show this message and exit.
anyscale cluster
Interact with clusters on Anyscale.
Options:
--help
Show this message and exit.
Commands:
archive
Archive a cluster on Anyscale.list
List information about clusters on Anyscale.start
Start or update and restart a cluster on Anyscale.terminate
Terminate a cluster on Anyscale.
anyscale cluster archive
Archive a cluster on Anyscale.
Options:
-n, --name TEXT
Name of existing cluster to archive.--cluster-id, --id TEXT
Id of existing cluster to archive. This argument can be used to archive any cluster you have access to in any project.--project-id TEXT
Override project id used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--project TEXT
Override project name used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--help
Show this message and exit.
anyscale cluster list
List information about clusters on Anyscale. By default only list active clusters in current project.
Options:
-n, --name TEXT
Name of existing cluster to get information about.--cluster-id, --id TEXT
Id of existing cluster get information about. This argument can be used to interact with any cluster you have access to in any project.--project-id TEXT
Override project id used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--project TEXT
Override project name used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--include-all-projects
List all active clusters user has access to in any project.--include-inactive
List clusters of all states.--include-archived
List archived clusters as well as unarchived clusters.If not provided, defaults to listing only unarchived clusters.--max-items INTEGER
Max items to show in list.--help
Show this message and exit.
anyscale cluster start
Start or update and restart a cluster on Anyscale.
Options:
-n, --name TEXT
Name of new or existing cluster to start or update.--env TEXT
Set the Anyscale app config to use for the cluster. This is a cluster environment name optionally followed by a colon and a build version number. Eg: my_cluster_env:1--compute TEXT
Name of cluster compute that is already registered with Anyscale.--compute-file TEXT
The YAML file of the cluster compute config to launch this cluster with. An example can be found at https://docs.anyscale.com/user-guide/configure/cluster-computes.--cluster-id, --id TEXT
Id of existing cluster to restart. This argument can be used to interact with any cluster you have access to in any project.--project-id TEXT
Override project id used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--project TEXT
Override project name used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--cloud-name TEXT
Name of cloud to create a default cluster compute with. If a default cloud needs to be used and this is not provided, the organization default cloud will be used.--idle-timeout INTEGER
DEPRECATED: Please specify the idle_termination_minutes field in the cluster compute. Idle timeout (in minutes), after which the cluster is stopped. Idle time is defined as the time during which a cluster is not running a user command and does not have an attached driver. Time spent running Jupyter commands, or commands run through ssh, is still considered 'idle'. -1 means no timeout. Default: 120 minutes--user-service-access [private|public]
Whether user service (eg: serve deployment) can be accessed by public internet traffic. If public, a user service endpoint can be queried from the public internet with the provided authentication token. If private, the user service endpoint can only be queried from within the same Anyscale cloud and will not require an authentication token.--help
Show this message and exit.
anyscale cluster terminate
Terminate a cluster on Anyscale.
Options:
-n, --name TEXT
Name of existing cluster to terminate.--cluster-id, --id TEXT
Id of existing cluster to termiante. This argument can be used to interact with any cluster you have access to in any project.--project-id TEXT
Override project id used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--project TEXT
Override project name used for this cluster. If not provided, the Anyscale project context will be used if it exists. Otherwise a default project will be used.--help
Show this message and exit.
anyscale cluster-compute
Manages cluster compute configurations to define cloud resource types and limitations.
Options:
--help
Show this message and exit.
Commands:
archive
Archive the specified cluster compute template.create
Builds a new cluster compute template.get
Get details about cluster compute configuration.list
List information about cluster computes on Anyscale.
anyscale cluster-compute archive
Archive the specified cluster compute template.
Options:
-n, --name TEXT
Name of the cluster compute template to archive.--cluster-compute-id, --id TEXT
Id of the cluster compute template to archive. Must be provided if a cluster compute name is not given.--help
Show this message and exit.
anyscale cluster-compute create
Builds a new cluster compute template. For an example of a cluster compute file, see the example_compute_config.json created by running anyscale init in a project directory.
Options:
-n, --name TEXT
Name for the created cluster compute.--help
Show this message and exit.
anyscale cluster-compute get
Get details about cluster compute configuration.
Options:
--cluster-compute-id, --id TEXT
Get details about cluster compute configuration by this id.--help
Show this message and exit.
anyscale cluster-compute list
List information about cluster computes on Anyscale. By default only list cluster computes you have created.
Options:
-n, --name TEXT
List information about the cluster compute with this name.--cluster-compute-id, --id TEXT
List information about the cluster compute with this id.--include-shared
Include all cluster cluster computes you have access to.--max-items INTEGER
Max items to show in list.--help
Show this message and exit.
anyscale cluster-env
Interact with cluster environments.
Options:
--help
Show this message and exit.
Commands:
build
Build a new cluster environment from config file.get
Get details about cluster environment build.list
List information about cluster environments on Anyscale.
anyscale cluster-env build
Build a new cluster environment from config file.
Options:
-n, --name TEXT
Name to save built cluster environment as. Default will be used if not provided--help
Show this message and exit.
anyscale cluster-env get
Get details about cluster environment build. The cluster-env-name
argument
is a cluster environment name optionally followed by a colon and a build
version number. Eg: my_cluster_env:1
Options:
--cluster-env-build-id, --id TEXT
Get details about cluster environment build by this id.--help
Show this message and exit.
anyscale cluster-env list
List information about cluster environments on Anyscale. By default only list cluster environments you have created.
Options:
-n, --name TEXT
List information about all builds of the cluster environment with this name.--cluster-env-id, --id TEXT
List information about all builds of the cluster environment with this id.--include-shared
Include all cluster environments you have access to.--max-items INTEGER
Max items to show in list.--help
Show this message and exit.
anyscale job
Interact with production jobs running on Anyscale.
Options:
--help
Show this message and exit.
Commands:
archive
Archive a job.list
Display information about existing jobs.logs
Print the logs of a job.output
Interact with Production Job outputs.submit
Submit a Production Jobterminate
Attempt to terminate a job asynchronously.wait
Wait for a Job to enter a specific state (default: SUCCESS).
anyscale job archive
Archive a job.
Options:
--job-id, --id TEXT
Unique ID of the job.-n, --name TEXT
Name of the job.--help
Show this message and exit.
anyscale job list
Display information about existing jobs.
Options:
-n, --name TEXT
Filter by job name.--job-id, --id TEXT
Filter by job id.--project-id TEXT
Filter by project id.--include-all-users
Include jobs not created by current user.--include-archived
List archived jobs as well as unarchived jobs.If not provided, defaults to listing only unarchived jobs.--max-items INTEGER
Max items to show in list.--help
Show this message and exit.
anyscale job logs
Print the logs of a job.
Options:
--job-id, --id TEXT
Unique ID of the job.-n, --name TEXT
Name of the job.-f, --follow
Whether to follow the log.--help
Show this message and exit.
anyscale job output
Interact with Production Job outputs.
Options:
--help
Show this message and exit.
Commands:
get
Get the output of a Production Job.write
Write the output of a Production Job to Anyscale.
anyscale job output get
Get the output of a Production Job.
Options:
--job-id, --id TEXT
Unique ID of the job.-n, --name TEXT
Name of the job.--help
Show this message and exit.
anyscale job output write
Write the output of a Production Job to Anyscale.
This command should be called from within a Production Job entrypoint. It will record the JSON output of your Job. If you specify neither a file or a string, this command will read from STDIN.
Examples:
anyscale job output write -f output.json
anyscale job output write '{"output": 5}'
cat output.json | anyscale job output write
Options:
-f, --file FILENAME
File to read the output from.--help
Show this message and exit.
anyscale job submit
Submit a Production Job
This function accepts 1 argument, a path to a YAML config file that defines this job.
To wait for the Job to complete, use the --wait flag as follows.
$ anyscale job submit job.yaml --wait
If running from an Anyscale Workspace, this command also support an alternative syntax to specify the entrypoint inline:
$ anyscale job submit -- python script.py
The Cluster Environment and Cluster Config are inferred from the Workspace Configuration if running from a workspace.
Options:
-n, --name TEXT
Name of the job.--description TEXT
Description of job.-f, --follow
Whether to follow the log of the created job-w, --wait
Whether to block this CLI command until the job succeeds (or reaches another terminal state)--help
Show this message and exit.
anyscale job terminate
Attempt to terminate a job asynchronously.
Options:
--job-id, --id TEXT
Unique ID of the job.-n, --name TEXT
Name of the job.--help
Show this message and exit.
anyscale job wait
Wait for a Job to enter a specific state (default: SUCCESS).
To specify the Job by name, use the --name flag. To specify the Job by id, use the --job-id flag.
If the Job reaches the target state, the command will exit successfully.
If the Job reaches a terminal state other than the target state, the command will exit with an error.
If the command reaches the timeout, the command will exit with an error.
Options:
--job-id, --id TEXT
Unique ID of the job.-n, --name TEXT
Name of the job.-s, --state TEXT
The state to wait for this Job to enter-t, --timeout FLOAT
The timeout in seconds after which this command will exit.--help
Show this message and exit.
anyscale migrate
Manages configurations such as cluster environments and compute configs that help you run jobs and clusters on Anyscale.
Options:
--help
Show this message and exit.
Commands:
convert
Converts a Ray cluster YAML into a cluster environment...upload-configs
Uploads both the cluster-env and compute-config.
anyscale migrate convert
Converts a Ray cluster YAML into a cluster environment and compute config.
Options:
--cloud TEXT
Cloud to create compute_config for.--ml / --no-ml
Whether to generate a cluster-env that contains ray-ml dependencies--gpu / --no-gpu
Whether to generate a cluster-env that contains the required dependencies to utilize a gpu--help
Show this message and exit.
anyscale migrate upload-configs
Uploads both the cluster-env and compute-config.
Options:
-n, --name TEXT
Name for both configs [required]--help
Show this message and exit.
anyscale project
Manages projects on Anyscale. A project can be used to organize a collection of jobs.
Options:
--help
Show this message and exit.
Commands:
create
Create a new project.list
List projects for which you have access.
anyscale project create
Create a new project.
Options:
-n, --name TEXT
Project name.--help
Show this message and exit.
anyscale project list
List projects for which you have access. By default, only projects created by you are listed.
Options:
-n, --name TEXT
List information for a particular project.--json
Format output as JSON.--created-by-me
List projects created by me only.--max-items INTEGER
Max items to show in list.--help
Show this message and exit.
anyscale schedule
Create and manage Anyscale Schedules.
Options:
--help
Show this message and exit.
Commands:
create
Create or Update a Schedulelist
List Schedulespause
Pause a Scheduleresume
Resume a Schedulerun
Manually run a Scheduleupdate
Create or Update a Scheduleurl
Get a Schedule URL
anyscale schedule create
Create or Update a Schedule
This function accepts 1 argument, a path to a YAML config file that defines this schedule.
Note: if a schedule with the name exists in the specified project, it will be updated instead.
Options:
-n, --name TEXT
Name of the schedule.--description TEXT
Description of schedule.--help
Show this message and exit.
anyscale schedule list
List Schedules
You can optionally filter schedules by rowname.
Options:
-n, --name TEXT
Filter by the name of the job-i, --id TEXT
Id of the schedule.--help
Show this message and exit.
anyscale schedule pause
Pause a Schedule
This function accepts 1 argument, a path to a YAML config file that defines this schedule. You can also specify the schedule by name or id.
Options:
-n, --name TEXT
Name of the schedule.-i, --id TEXT
Id of the schedule.--help
Show this message and exit.
anyscale schedule resume
Resume a Schedule
This function accepts 1 argument, a path to a YAML config file that defines this schedule. You can also specify the schedule by name or id.
Options:
-n, --name TEXT
Name of the schedule.-i, --id TEXT
Id of the schedule.--help
Show this message and exit.
anyscale schedule run
Manually run a Schedule
This function takes an existing schedule and runs it now. You can specify
the schedule by name or id. You can also pass in a YAML file as a
convinience. This is equivalent to passing in the name specified in the YAML
file. IMPORTANT: if you pass in a YAML definition that differs from the
Schedule defition, the Schedule will NOT be updated. Please use the
anyscale schedule update
command to update the configuration of your
schedule or use the anyscale job submit
command to submit a one off job
that is not a part of a schedule.
Options:
-n, --name TEXT
Name of the schedule.-i, --id TEXT
Id of the schedule.--help
Show this message and exit.
anyscale schedule update
Create or Update a Schedule
This function accepts 1 argument, a path to a YAML config file that defines this schedule.
Options:
-n, --name TEXT
Name of the schedule.--description TEXT
Description of schedule.--help
Show this message and exit.
anyscale schedule url
Get a Schedule URL
This function accepts 1 argument, a path to a YAML config file that defines this schedule. You can also specify the schedule by name or id.
Options:
-n, --name TEXT
Name of the schedule.-i, --id TEXT
Id of the schedule.--help
Show this message and exit.
anyscale service
Interact with production services running on Anyscale.
Options:
--help
Show this message and exit.
Commands:
archive
Archive a service.deploy
Deploy a service to Anyscale.list
Display information about existing services.terminate
Attempt to terminate a service asynchronously.
anyscale service archive
Archive a service.
Options:
--service-id, --id TEXT
Id of service.-n, --name TEXT
Name of service.--help
Show this message and exit.
anyscale service deploy
Deploy a service to Anyscale.
Options:
-n, --name TEXT
Name of service.--description TEXT
Description of service.--healthcheck-url TEXT
Healthcheck URL for Service.--help
Show this message and exit.
anyscale service list
Display information about existing services.
Options:
-n, --name TEXT
Filter by service name.--service-id, --id TEXT
Filter by service id.--project-id TEXT
Filter by project id.--include-all-users
Include services not created by current user.--include-archived
List archived services as well as unarchived services.If not provided, defaults to listing only unarchived services.--max-items INTEGER
Max items to show in list.--help
Show this message and exit.
anyscale service terminate
Attempt to terminate a service asynchronously.
Options:
--service-id, --id TEXT
Id of service.-n, --name TEXT
Name of service.--help
Show this message and exit.
anyscale version
Display version of the anyscale CLI.
Options:
--json
Return output as json.--help
Show this message and exit.