Configuration - Docker mode
The configuration file of a Ponos agent in Docker mode is an extension of the generic Ponos agent. Only the docker section is added.
docker.volumes
Docker volumes used to launch Arkindex tasks in Docker containers.
docker.volumes.on
Filters Arkindex tasks by Unix shell-style wildcard for which the volume must be added. By default, the volume is added to all Arkindex tasks. Otherwise the volume is only added to the Arkindex task whose slug matches the value.
docker.cache_usage
Whether to check the local cache to reuse Docker images available on host. Defaults to false.
Configures the preference for using a locally cached Docker image over pulling one from the registry:
cache_first-
If a locally cached Docker image exists, use it. Otherwise, pull from the registry.
This could cause cache invalidation issues: if a new version of a
:latestDocker image is published, this agent will not use it until the image is removed from the cache.This is recommended for local development, as it skips the step of pushing a locally built image to a registry before testing it.
remote_first(default)-
Pull from the registry first. If this fails and a locally cached Docker image exists, use it.
This is recommended in production to avoid any downtime when a registry encounters issues.
require_pull-
Always pull from the registry. If this fails, no locally cached image will be used, even if it does exist on the host.
This guarantees that the task will always run with the most up-to-date Docker image from the registry, at the cost of cascading any Docker registry or network issues down to Ponos tasks.
docker.shared_process_volume
Whether to store process data of Arkindex tasks using a Docker volume. Defaults to false.
Example
Below is an example of a YAML configuration file to start a Ponos agent in a Docker mode.
# Generic Ponos agent
...
# Ponos agent in a Docker mode
docker:
network: arkindex_default # Defaults to `None`
dns: # Defaults to `[]`
- dns_server
volumes: # Defaults to `[]`
- src: /path/to/ark/ml-classifiers # Required
dest: /arkindex/classifiers # Required
"on": ml_* # Defaults to `None`
mode: ro # Defaults to `rw`
registries: # Defaults to `[]`
url: https://docker.registry.com # Required
username: teklia # Required
password: Sup3rS3cret # Required
fake_gpus: # Defaults to `[]`
- id: GPU-26581030-aeb7-4eb7-9193-3e1b60ddf11a # Required
name: Fake GPU # Required
ram_total: 42 # Required
cache_usage: require_pull # defaults to `remote_first`
shared_process_volume: true # Defaults to `false`