|
|
The goal of the runner script is to provide an abstraction level above the tricky *dl_setup* implementation. This script aims to make life easier for non-tech users by offering a simple and direct CLI.
|
|
|
|
|
|
There are several commands you can pass to the script: most of them accept one or more arguments.
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
#### Ask for help
|
|
|
More information and examples of usage can be found running:
|
|
|
```bash
|
|
|
./run <command> --help
|
|
|
```
|
|
|
|
|
|
#### Build a model container
|
|
|
```bash
|
|
|
./run build_model
|
|
|
./run build_model --model models/model_name
|
|
|
```
|
|
|
|
|
|
#### Push a model container
|
|
|
```bash
|
|
|
./run push_model
|
|
|
./run push_model --model models/model_name
|
|
|
./run push_model --model models/model_name --tag latest
|
|
|
```
|
|
|
|
|
|
#### Pull a model container
|
|
|
```bash
|
|
|
./run pull_model
|
|
|
./run pull_model --model models/model_name
|
|
|
```
|
|
|
|
|
|
#### Run a model container in train/inference
|
|
|
```bash
|
|
|
./run run_model --config models/model/name/config.ini --train
|
|
|
./run run_model --model models/model_name --config aDir/inf.ini --inference
|
|
|
./run run_model --config aDir/aSubDir/train_unet.ini --train
|
|
|
./run run_model --model models/model_name --config another.ini --train
|
|
|
./run run_model --model models/model_name --config another.ini --inference
|
|
|
```
|
|
|
|
|
|
#### Run a command inside a container.
|
|
|
Options and volumes can be passed through one of the following methods (exclusive):
|
|
|
- arguments
|
|
|
- configuration file with `__docker__` section
|
|
|
Examples of usage:
|
|
|
```bash
|
|
|
./run run --container myContainer --command /bin/bash --config myConfig.ini
|
|
|
./run run --container myContainer --config myConfig.ini --command /bin/bash
|
|
|
./run run --container myContainer --options '--rm -it -v /data:/data' --command /bin/bash
|
|
|
```
|
|
|
|
|
|
#### build misc container for Jupyter notebooks or scripts
|
|
|
```bash
|
|
|
./run build_misc
|
|
|
./run build_misc --tag 1.2
|
|
|
```
|
|
|
|
|
|
#### Push misc container for Jupyter notebooks or scripts
|
|
|
```bash
|
|
|
./run push_misc
|
|
|
./run push_misc --tag latest
|
|
|
```
|
|
|
|
|
|
#### Pull misc container for Jupyter notebooks or scripts
|
|
|
```bash
|
|
|
./run pull_misc
|
|
|
```
|
|
|
|
|
|
#### Run misc container for Jupyter notebooks or scripts
|
|
|
```bash
|
|
|
./run run_misc --notebook --config myConfig.ini
|
|
|
./run run_misc --notebook --config myConfig.ini --args '--no-browser --port=8888'
|
|
|
./run run_misc --notebook --options '--rm -it -v /data:/data'
|
|
|
./run run_misc --script script_name.sh --config myConfig.ini --args "--script_arg arg1 --another arg2"
|
|
|
./run run_misc -s 'python3 scripts/dummy_python_script.py' --options '--rm -it'
|
|
|
./run run_misc --script script_name.sh --options '--rm -it -v /data:/data' --args "--script_arg arg1 --another arg2"
|
|
|
```
|
|
|
|
|
|
#### Manage development environement
|
|
|
```bash
|
|
|
./run dev_env --generate
|
|
|
./run dev_env --update
|
|
|
``` |