Configurations

Tweak the behavior of the knots-hub runtime using a configuration system.

Each config key is set using an individual environment variable:

KNOTSHUB_USER_INSTALL_PATH
KNOTSHUB_INSTALLER
KNOTSHUB_VENDOR_INSTALLER_CONFIG_PATHS
KNOTSHUB_DISABLE_LOCAL_CHECK

Content

key name

local_install_path

type

<class ‘pathlib.Path’>

required

yes

default

None

environment variable

KNOTSHUB_USER_INSTALL_PATH

description

Filesystem path to a directory that may exist, used to store all the filesystem data for the hub.

installer

type

Optional[knots_hub.config.HubInstallerConfig]

required

no

default

None

environment variable

KNOTSHUB_INSTALLER

description

A string providing configuration for the hub installation.The string is formatted as version=path, where path is a fileystempath to an existing directory containing the hub to install, and versionbeing the version of the hub corresponding to the path. The version isan arbitrary chain of character, usually following semver conventions,that is just used to check if the last locally installed version matchthe current installer version.

vendor_installer_config_paths

type

list[pathlib.Path]

required

no

default

[]

environment variable

KNOTSHUB_VENDOR_INSTALLER_CONFIG_PATHS

description

Filesystem path to one or multiple existing json file used to specify which external program to install with which version.If specified from an environment variable the list of paths isseparated by the system path separator character.

skip_local_check

type

<class ‘bool’>

required

no

default

False

environment variable

KNOTSHUB_DISABLE_LOCAL_CHECK

description

Disable the check verifying if the app is directly launched from the server or locally.Any non-empty value in the environment variable will disable it.

Vendor Installers Config

A configuration file in the json syntax that define a list of program installer that must be installed on the user local system and how each of them must be configured.

The abstract configuration is defined as:

{
   "{installer_name}": {
      ...  # installer configuration arguments
   },
   # next installer
   ...
}

The list of supported installers and their configuration is as follow:

rez

Install rez at the given location. See https://rez.readthedocs.io/en/stable/

  • install_dir (str): filesystem path to a directory that may exists.The parent directory must exist (use the dirs_to_make if the parent may not exist yet).The path can contains environment variable like $ENVAR/foo where the $ can be escaped by doubling it like $$.

  • dirs_to_make (list[str]): optional list of filesystem path to directories that may exists.Each directory will be created on install if it doesn’t exist but each of their parent directory must exist. The path can contains environment variable like $ENVAR/foo where the $ can be escaped by doubling it like $$.

  • python_version (str): a full valid python version to install rez with

  • rez_version (str): a full valid rez version to install from the official GitHub repo.

knots

“Meta” kind vendor which install whatever is needed for the downstream pipeline.

  • install_dir (str): filesystem path to a directory that may exists.The parent directory must exist (use the dirs_to_make if the parent may not exist yet).The path can contains environment variable like $ENVAR/foo where the $ can be escaped by doubling it like $$.

  • dirs_to_make (list[str]): optional list of filesystem path to directories that may exists.Each directory will be created on install if it doesn’t exist but each of their parent directory must exist. The path can contains environment variable like $ENVAR/foo where the $ can be escaped by doubling it like $$.