Command run

The run command is used to create a new job based on files in the current working directory and start the job command.

This commands differs to aetros start in the way, that you need to Git commit & push all changes to use aetros start while aetros run automatically stores your files from the current working directory in the Git tree of the new job.

Per default this command stores all files smaller than 10MB from the current working directory in the file tree of the new job. You can exclude files by using ignore in aetros.yml which works like a ".gitignore". If you have bigger files needed in your job, consider using an external service like AWS S3 or use an AETROS Dataset.
aetros init model-name
aetros run --local 'python script.py'
aetros run --local --image tensorflow/tensorflow 'python script.py'
aetros run --local --image tensorflow/tensorflow --cpu 5 'python script.py'
aetros init model-name
aetros run --cpu 3 'python script.py'
aetros run --image tensorflow/tensorflow --gpu 2 --gpu 1 'python script.py'

You can also configure each image, cpu, command etc separate or all together in your aetros.yml. "aetros run" reads then everything from the configuration file and you can overwrite per command argument. Example:

# names from AETROS Trainer model: user/model-name # docker image name image: tensorflow/tensorflow # shell command command: python my-script.py
echo "print('Hi')" > my-script.py
ls -al
total 16 drwxr-xr-x 4 marc staff 136 Oct 20 13:38 . drwxr-xr-x 18 marc staff 612 Oct 20 13:33 .. -rw-r--r-- 1 marc staff 174 Oct 20 13:38 aetros.yml -rw-r--r-- 1 marc staff 12 Oct 20 13:38 my-script.py
aetros run

Docker environments

If you don't want to execute the job's script directly in the host's environment, you can use a docker image for it. Per default, we read image: docker/image-name in aetros.yml configuration. You can overwrite that by defining --image docker/other-image.

If you run the job localy using --local with a Docker image, you need to have Docker installed first.
usage: aetros run [-h] [-i IMAGE] [--no-image] [-s SERVER] [-m MODEL] [-l] [-c CONFIG] [--priority PRIORITY] [--cpu CPU] [--memory MEMORY] [--gpu GPU] [--gpu_memory GPU_MEMORY] [--offline OFFLINE] [--rebuild-image] [--max-time MAX_TIME] [--max-epochs MAX_EPOCHS] [--gpu-device GPU_DEVICE] [--volume VOLUME] [-e E] [-p PARAM] [command] positional arguments: command The command to run. Default read in configuration file optional arguments: -h, --help show this help message and exit -i IMAGE, --image IMAGE Which Docker image to use for the command. Default read in configuration file. If not specified, command is executed on the host. --no-image Forces not to use docker, even when image is defined in the configuration file. -s SERVER, --server SERVER Limits the server pool to this server. Default not limitation or read in configuration file. Multiple --server allowed. -m MODEL, --model MODEL Under which model this job should be listed. Default read in configuration file -l, --local Start the job immediately on the current machine. -c CONFIG, --config CONFIG Default aetros.yml in current working directory. --priority PRIORITY Increases or decreases priority. Default is 0. --cpu CPU How many CPU cores should be assigned to job. Docker only. --memory MEMORY How much memory should be assigned to job. Docker only. --gpu GPU How many GPU cards should be assigned to job. Docker only. --gpu_memory GPU_MEMORY Memory requirement for the GPU. Docker only. --offline OFFLINE Whether the execution should happen offline. --rebuild-image Makes sure the Docker image is re-built without cache. --max-time MAX_TIME Limit execution time in seconds. Sends SIGINT to the process group when reached. --max-epochs MAX_EPOCHS Limit execution epochs. Sends SIGINT to the process group when reached. --gpu-device GPU_DEVICE Which device id should be mapped into the NVIDIA docker container. Only when --local --volume VOLUME, -v VOLUME Volume into docker. Only when --local -e E Sets additional environment variables. '-e name=value' to set value, or '-e name' to read from current env -p PARAM, --param PARAM Sets a hyperparameter, example '--param name=value'. Multiple --param allowed.