Container

class laminar.configurations.layers.Container(command: str = 'python main.py', cpu: int = 1, image: str = 'rchui/laminar:3.8', memory: int = 1500, workdir: str = '/laminar')

Bases: object

Configures a layer’s container properties.

Notes

Most configurations map one-to-one with a configuration here: https://docs.docker.com/engine/reference/commandline/container_run/

Usage:

@Flow.register(container=Container(...))

Methods

Attributes

command

Command to execute in the container

cpu

vCPUs to allocate to the container

image

Image to create the container with

memory

Memory in megabytes

workdir

Directory to execute the command in

__init__(command: str = 'python main.py', cpu: int = 1, image: str = 'rchui/laminar:3.8', memory: int = 1500, workdir: str = '/laminar')
command : str = 'python main.py'

Command to execute in the container

cpu : int = 1

vCPUs to allocate to the container

image : str = 'rchui/laminar:3.8'

Image to create the container with

memory : int = 1500

Memory in megabytes

workdir : str = '/laminar'

Directory to execute the command in