Submit a runai job for execution
runai submit <job-name>
[--environment <stringArray> | -e <stringArray>]
[--gpu <int> | -g <int>]
[--image <string> | -i <string>]
[--service-type <string> | -s <string>]
[--volume <stringArray> | -v stringArray]
[--project <string> | -p <string>]
[--help | -h]
- Options with value type of stringArray mean that you can add multiple values. You can either separate values with a comma or add the flag twice.
<job-name> the name of the job to run the command in
<command> the command itself (e.g. bash)
Arguments to pass to the command run on container start. Use together with --command.
Example: --command sleep --args 10000
Command to run at container start. Use together with --args.
CPU units to allocate for the job (0.5, 1, .etc). The Job will receive at least this amount of CPU. Note that the Job will not be scheduled unless the system can guarantee this amount of CPUs to the job.
Limitations of the number of CPU consumed by the job (0.5, 1, .etc). The system guarantees that this Job will not be able to consume more than this amount of GPUs.
Mark the job as elastic. For further information on Elasticity see https://support.run.ai/hc/en-us/articles/360011347560-Elasticity-Dynamically-Stretch-Compress-Jobs-According-to-GPU-Availability
-e <stringArray> | --environment <stringArray>
Define environment variables to be set in the container. To set multiple values add the flag multiple times (-e BATCH_SIZE=50 -e LEARNING_RATE=0.2) or separate by a comma (-e BATCH_SIZE:50,LEARNING_RATE:0.2)
--gpu <int> | -g <int>
Number of GPUs to allocation to the Job. Default is no GPUs.
Use the host's ipc namespace. Controls whether the pod containers can share the host IPC namespace. IPC (POSIX/SysV IPC) namespace provides separation of named shared memory segments, semaphores and message queues.
Shared memory segments are used to accelerate inter-process communication at memory speed, rather than through pipes or through the network stack
For further information see docker documentation
Use the host's network stack inside the container
For further information see docker documentation
--image <string> | -i <string>
Image to use when creating the container for this Job
Mark this Job as Interactive. Interactive jobs are not terminated automatically by the system
(Deprecated) Shortcut for running a jupyter notebook container. Uses a pre-created image and a default notebook configuration. Use the templates flag instead.
Mount a large /dev/shm device. shm is a shared file system mounted on RAM
Use a local image for this job. A local image is an image which exists on all local servers of the Kubernetes Cluster.
CPU memory to allocate for this job (1G, 20M, .etc). The Job will receive at least this amount of memory. Note that the Job will not be scheduled unless the system can guarantee this amount of memory to the job.
CPU memory to allocate for this job (1G, 20M, .etc). The system guarantees that this Job will not be able to consume more than this amount of memory. The Job will receive an error when trying to allocate more memory than this limit.
(Deprecated) Job Name. Add the name without the --name flag.
Allows defining specific nodes (machines) or group of nodes on which the workload will run. To use this feature please contact your administrator in order to label the nodes first.
Expose ports from the Job container. Used together with --service-type.
--port 8080:80 --service-type loadbalancer
--port 8080 --service-type ingress
Mark an interactive job as preemptible. Preemptible jobs can be scheduled above guaranteed quota but may be reclaimed at any time.
Run in the context of the current user running the Run:AI command rather than the root user. While the default container user is root (same as in Docker), this command allows you to submit a job running under your linux user. This would manifest itself in access to operating system resources, in the owner of new folders created under shared directories etc.
--service-type <string> | -s <string>
Service exposure method for interactive Job. Options are: portforward, loadbalancer, nodeport, ingress.
Use the command runai list to obtain the endpoint to use the service when the job is running. Different service methods have different endpoint structure
Use a specific template when running this job. Templates are set by the cluster administrator and provide predefined values to flags under the submit command. If a template is not set, a default template will be use if such exists
Define the duration, post job finish, after which the job is automatically deleted (5s, 2m, 3h, .etc).
Note: This setting must first be enabled at the cluster level. See https://support.run.ai/hc/en-us/articles/360011623839-Automatically-Delete-Jobs-After-Job-Finish
--volume <stringArray> | -v <stringArray>
Volume to mount into the container. Example -v /raid/public/john/data:/root/data:ro The flag may optionally be suffixed with :ro or :rw to mount the volumes in read-only or read-write mode, respectively.
Starts the container with the specified directory
Set the logging level. One of: debug|info|warn|error (default "info")
--project | -p (string)
Specify the project to which the command applies. Run:AI Projects are used by the scheduler to calculate resource eligibility. By default, commands apply to the default project. To change the default project use 'runai project set <project name>'.
--help | -h
Show help text
start an unattended training job of name run1, based on project team-ny using a quickstart image:
runai submit run1 -i gcr.io/run-ai-lab/quickstart -g 1 -p team-ny
start an interactive job of name run2, based on project team-ny using a jupyter notebook image. The Notebook will be externalized via a load balancer on port 8888:
runai submit run2 -i jupyter/base-notebook -g 1 \
-p team-ny --interactive --service-type=loadbalancer
The command will attempt to submit a job. You can follow up on the job by running runai list or runai get <job-name> -e
Note that the submit call may use templates to provide defaults to any of the above flags.
- See any of the Walkthrough documents here: https://support.run.ai/hc/en-us/articles/360010773460-Run-AI-Walkthroughs
- See runai template https://support.run.ai/hc/en-us/articles/360011548039-runai-template for a description on how templates work