idmtools_platform_local.infrastructure.workers module

idmtools workers container.

The workers container has our UI, API, and queue workers.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

idmtools_platform_local.infrastructure.workers.get_worker_image_default()

Get our default worker image.

We first check if it is nightly. Nightly will ALWAYS use staging.

If we are not using nightly, we then us production using the current version.

class idmtools_platform_local.infrastructure.workers.WorkersContainer(container_name: str = 'idmtools_workers', image: str = 'docker-production.packages.idmod.org/idmtools/local_workers:1.7.1', client: Optional[DockerClient] = None, config_prefix: str = 'workers_', network: Optional[str] = None, host_data_directory: Optional[str] = None, postgres_port: int = 5432, redis_port: int = 6379, ui_port: int = 5000, mem_limit: str = '16g', mem_reservation: str = '64m', run_as: Optional[str] = None, debug_api: bool = True, data_volume_name: Optional[str] = None, enable_singularity_support: bool = False)

Bases: BaseServiceContainer

Proves the Workers container definition.

host_data_directory: str = None
postgres_port: int = 5432
redis_port: int = 6379
ui_port: int = 5000
mem_limit: str = '16g'
mem_reservation: str = '64m'
run_as: str = None
debug_api: bool = True
image: str = 'docker-production.packages.idmod.org/idmtools/local_workers:1.7.1'
container_name: str = 'idmtools_workers'
data_volume_name: str = None
config_prefix: str = 'workers_'
enable_singularity_support: bool = False
get_configuration() Dict

Get our configuration.

create(spinner=None) Container

Create our workers container.

Raises:

EnvironmentError - If the local platform isn't in ready state.

__init__(container_name: str = 'idmtools_workers', image: str = 'docker-production.packages.idmod.org/idmtools/local_workers:1.7.1', client: Optional[DockerClient] = None, config_prefix: str = 'workers_', network: Optional[str] = None, host_data_directory: Optional[str] = None, postgres_port: int = 5432, redis_port: int = 6379, ui_port: int = 5000, mem_limit: str = '16g', mem_reservation: str = '64m', run_as: Optional[str] = None, debug_api: bool = True, data_volume_name: Optional[str] = None, enable_singularity_support: bool = False) None