fre.make.create_docker_script module

Generates a Dockerfile and an accompanying createContainer.sh script that builds a Docker image containing the compiled model executable and the library dependencies from the generated Dockerfile. Unless specified, createContainer.sh will convert the Docker OCI image to a Singularity image file format (.sif) that can be launched with Singularity/Apptainer.

Note, once the container image is built, the source code and the compiled executable cannot be modified.

fre.make.create_docker_script.dockerfile_create(yamlfile: str, platform: tuple[str], target: tuple[str], execute: bool = False, no_format_transfer: bool = False)

This function dockerfile_create creates a Dockerfile and an accompanying createContainer.sh script that builds a container image containing the compiled model executable and the library dependencies

Parameters:
  • yamlfile (str) – model compile YAML file

  • platform (tuple(str)) – FRE container-specific platform(s) that are defined in platforms.yaml

  • target (tuple(str)) – Predefined FRE targets

  • execute (bool) – If true, execute createContainer.sh to build the container image

  • no_format_transfer (bool) – if True, skip container image format conversion to a .sif file

Raises:

ValueError – Error if platform does not exist in platforms.yaml

Note

If building the container image on GFDL’s RDHPCS GAEA with the Podman container engine, please submit a GFDL helpdesk ticket to request Podman access