tesseract
command line application¶
tesseract¶
Tesseract: A toolkit for re-usable, autodiff-native software components.
tesseract [OPTIONS] COMMAND [ARGS]...
Options
- --loglevel <LEVEL>¶
Set the logging level. At debug level, also print tracebacks for user errors.
- Default:
<LogLevel.info: 'info'>
- Options:
debug | info | warning | error | critical
- --version¶
Print Tesseract CLI version and exit.
- --install-completion¶
Install completion for the current shell.
- --show-completion¶
Show completion for the current shell, to copy it or customize the installation.
apidoc¶
Serve the OpenAPI schema for a Tesseract.
tesseract apidoc [OPTIONS] IMAGE_NAME
Options
- --browser, --no-browser¶
Open the browser after serving the OpenAPI schema
- Default:
True
Arguments
- IMAGE_NAME¶
Required argument
Tesseract image name
build¶
Build a new Tesseract from a context directory.
The passed directory must contain the files tesseract_api.py and tesseract_config.yaml (can be created via tesseract init).
tesseract build [OPTIONS] SRC_DIR
Options
- -t, --tag <tag>¶
Tag for the resulting Tesseract. This can help you distinguish between Tesseracts with the same base name, like cfd:v1 and cfd:v2`, both named cfd but tagged as v1 and v2 respectively.
- --build-dir <build_dir>¶
Directory to use for the build. Defaults to a temporary directory.
- --forward-ssh-agent, --no-forward-ssh-agent¶
Forward the SSH agent to the Docker build environment. Has to be provided if requirements.txt contains private dependencies.
- Default:
False
- --config-override <KEYPATH=VALUE>¶
Override a configuration option in the Tesseract. Format:
keypath=value
wherekeypath
is a dot-separated path to the attribute in tesseract_config.yaml. Possible keypaths are: name, version, description, build_config.Possible build_config options are: base_image, target_platform, extra_packages, package_data, custom_build_steps.
Example:
--config-override build_config.target_platform=linux/arm64
.
- --keep-build-cache, --no-keep-build-cache¶
Keep the Docker build cache (useful for debugging).
- Default:
False
- --generate-only, --no-generate-only¶
Only generate the build context and do not actually build the image.
- Default:
False
Arguments
- SRC_DIR¶
Required argument
Source directory for the Tesseract. Must contain tesseract_api.py and tesseract_config.yaml.
Environment variables
- TESSERACT_KEEP_BUILD_CACHE
Provide a default for
--keep-build-cache
init¶
Initialize a new Tesseract API module.
tesseract init [OPTIONS]
Options
- --name <name>¶
Tesseract name as specified in tesseract_config.yaml. Will be prompted if not provided.
- --target-dir <target_dir>¶
Path to the directory where the Tesseract API module should be created.
- Default:
'current directory'
- --recipe <recipe>¶
Use a pre-configured template to initialize Tesseract API and configuration.
- Default:
'base'
- Options:
base | jax
list¶
Display all Tesseract images.
tesseract list [OPTIONS]
ps¶
Display all Tesseract containers.
tesseract ps [OPTIONS]
run¶
Execute a command in a Tesseract.
This command starts a Tesseract instance and executes the given command.
tesseract run [OPTIONS] TESSERACT_IMAGE [CMD] [ARGS]...
Options
- -v, --volume <source:target>¶
Bind mount a volume, in Docker format: source:target.
- --gpus <'all' | int>¶
IDs of host GPUs to make available in the tesseract. You can use all GPUs via –gpus all or pass (multiple) IDs: –gpus 0 –gpus 1.
Arguments
- TESSERACT_IMAGE¶
Required argument
Tesseract image name
- CMD¶
Optional argument
Tesseract command to run
- ARGS¶
Optional argument(s)
Arguments for the command
serve¶
Serve one or more Tesseract images.
A successful serve command will display on standard output a JSON object with the Docker Compose project ID, which is required to run the teardown command, as well as a list of all containers spawned and their respective ports.
tesseract serve [OPTIONS] IMAGE_NAMES...
Options
- -v, --volume <source:target>¶
Bind mount a volume in all Tesseracts, in Docker format: source:target[:ro|rw]
- -p, --port <port>¶
Optional port/port range to serve the Tesseract on (e.g. -p ‘8080-8082’). Port must be between 1025 and 65535.
- --gpus <'all' | int>¶
IDs of host Nvidia GPUs to make available in the Tesseract. You can use all GPUs via –gpus all or pass (multiple) IDs: –gpus 0 –gpus 1.
Arguments
- IMAGE_NAMES¶
Required argument(s)
One or more Tesseract image names
teardown¶
Tear down one or more Tesseracts that were previously started with tesseract serve.
One or more Tesseract project ids must be specified unless –all is set.
tesseract teardown [OPTIONS] [PROJECT_IDS]...
Options
- --all¶
Tear down all Tesseracts currently being served.
- Default:
False
Arguments
- PROJECT_IDS¶
Optional argument(s)
Docker Compose project IDs