idmtools_platform_local.local_platform module¶
idmtools local platform.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- class idmtools_platform_local.local_platform.LocalPlatform(*args, **kwargs)¶
Bases:
idmtools.entities.iplatform.IPlatform
Represents the platform allowing to run simulations locally.
- host_data_directory: str = '/home/docs/.local_data'¶
Directory where data for local platform such as files and postgres data will be stored
- workers_image: str = None¶
Workers image to use. Defaults to version compatible with current idmtools version
- auto_remove_worker_containers: bool = True¶
allows user to specify auto removal of docker worker containers
- enable_singularity_support: bool = False¶
Enables singularity support. This requires elevated privileges on docker and should only be used when using singularity within workflows. This feature is in BETA so it may be unstable
- cleanup(delete_data: bool = False, shallow_delete: bool = False, tear_down_brokers: bool = False)¶
Cleanup the platform.
If delete data is true, the local platform data is deleted. If shallow delete is true, just the data within the local platform data directory is deleted. If tear down brokers is true, the task brokers talking to the server are destroyed.
- Parameters:
delete_data – Should data be deleted
shallow_delete – Should just the files be deleted
tear_down_brokers – Should we destroy our brokers
- post_setstate()¶
Post set-state.
- __init__(_uid: uuid.UUID = None, _IItem__pre_creation_hooks: typing.List[typing.Callable[[IItem, IPlatform], None]] = <factory>, _IItem__post_creation_hooks: typing.List[typing.Callable[[IItem, IPlatform], None]] = <factory>, _platform_defaults: typing.List[idmtools.entities.iplatform_default.IPlatformDefault] = <factory>, _config_block: str = None, host_data_directory: str = '/home/docs/.local_data', network: str = 'idmtools', redis_image: str = 'redis:5.0.9-alpine', redis_port: int = 6379, runtime: typing.Optional[str] = None, redis_mem_limit: str = '128m', redis_mem_reservation: str = '64m', postgres_image: str = 'postgres:11.9', postgres_mem_limit: str = '64m', postgres_mem_reservation: str = '32m', postgres_port: typing.Optional[str] = 5432, workers_mem_limit: str = '16g', workers_mem_reservation: str = '128m', workers_image: str = None, workers_ui_port: int = 5000, heartbeat_timeout: int = 15, default_timeout: int = 45, launch_created_experiments_in_browser: bool = False, auto_remove_worker_containers: bool = True, enable_singularity_support: bool = False) None ¶