ou_container_builder.settings
#
Configuration settings.
- class ou_container_builder.settings.AptDebLine(*, url: HttpUrl, distribution: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], component: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)])#
Settings for an APT deb line.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.AptPackageLists(*, core: list[Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)]] = [], build: list[Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)]] = [], deploy: list[Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)]] = [])#
Settings for a list of apt packages for build and deploy stages.
- classmethod add_stages(data: Any) Any #
If only a list of packages is given, convert that to the stage structure.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.AptSource(*, name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], key_url: HttpUrl, dearmor: bool = True, deb: AptDebLine)#
Settings for a single APT source.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Arg(*, name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], value: str | None = None)#
Docker argument.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.BuildScript(*, stage: Literal['build', 'deploy'], commands: list[str])#
A script to be run during the build in the build or deploy stage.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Content(*, source: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], target: str = '', overwrite: Literal['always', 'never'])#
Settings for the content configuration.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.EnvironmentVariable(*, name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], value: str = '')#
Settings for additional environment variables.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Image(*, base: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)] = 'python:3.11-bookworm', user: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)] = 'ou')#
Settings for the Docker image configuration.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Module(*, code: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], presentation: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)])#
Settings for the module configuration.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.OutputBlock(*, block: str, weight: int = 999)#
Settings for a single block in the generated Dockerfile.
- classmethod convert_string_block(data: Any) Any #
Convert string blocks into the dictionary structure.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.OutputBlocks(*, build: list[OutputBlock] = [], deploy: list[OutputBlock] = [])#
Blocks for the generated Dockerfile.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Packages(*, apt: AptPackageLists = AptPackageLists(core=[], build=[], deploy=[]), pip: PipPackageLists = PipPackageLists(system=[], user=[]))#
Settings for the packages configuration.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.PacksModel(*, code_server: Options | None = None, ipykernel: Options | None = None, irkernel: Options | None = None, jupyterlab: Options | None = None, notebook: Options | None = None, xfce4: Options | None = None)#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.PipPackageEntry(*, name: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], type: Literal['package'] | Literal['requirements.txt'] | None = 'package')#
Settings for a single entry for a pip installation.
Can either represent a single file or a requirements file.
- classmethod convert_simple_packages(data: Any) Any #
If only a list of packages is given, convert that to the target structure.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.PipPackageLists(*, system: list[PipPackageEntry] = [], user: list[PipPackageEntry] = [])#
Settings for a list of pip packages for system and user targets.
- classmethod add_targets(data: Any) Any #
If only a list of packages is given, convert that to the target structure.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Server(*, default_path: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)] = '/', access_token: str | None = None, wrapper_host: str | None = '*.open.ac.uk')#
Settings for the core server configuration.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Settings(*, version: Literal['3'] = '2', module: Module, image: Image = Image(base='python:3.11-bookworm', user='ou'), environment: list[EnvironmentVariable] = [], args: list[Arg] = [], server: Server = Server(default_path='/', access_token=None, wrapper_host='*.open.ac.uk'), content: list[Content] = [], sources: Sources = Sources(apt=[]), packages: Packages = Packages(apt=AptPackageLists(core=[], build=[], deploy=[]), pip=PipPackageLists(system=[], user=[])), web_apps: list[WebApp] = [], services: list[Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)]] = [], scripts: list[BuildScript | StartupShutdownScript] = [], packs: PacksModel = {}, jupyter_server_config: dict = {}, output_blocks: OutputBlocks = OutputBlocks(build=[], deploy=[]))#
Application Settings.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.Sources(*, apt: list[AptSource] = [])#
Settings for the additional sources configuration.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.StartupShutdownScript(*, stage: Literal['startup'], name: str, commands: list[str])#
A script to be run at startup or shutdown time.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ou_container_builder.settings.WebApp(*, path: Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None)], options: dict)#
Settings for a single web application configuration.
- classmethod convert_command_string_to_list(data: Any) Any #
Convert command strings to lists using shlex.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ou_container_builder.settings.load_settings() dict #
Load the settings from the ContainerConfig.yaml.