GuidesAPI reference


create_dockerfile - function

Source on GitHub

	pipeline_graph_paths: List[str],
  output_dir: str = "./",
  platform: str = "linux/amd64",
	requirements: Optional[str] = None,


Creates a Dockerfile extending the pipeline-docker image using locally serialised graphs.

The generated Dockerfile is simplistic with the heavy lifting carried out by the root image mysticai/pipeline-docker (Github source). All serialised graphs are copied into the /app/pipelines directory which is read by the root image.


  • pipeline_graph_paths (List[str]) - serialised graph paths to include in the docker image.
  • output_dir (str, optional) - the output location for the created Dockerfile.
  • platform (str, optional) - target platform to construct for in the Dockerfile.
  • requirements (str, optional) - path to a requirements.txt file to install in the Dockerfile python environment.

Dockerfile output

A typical Dockerfile created from the create_dockerfile function will look like the following:

# Dockerfile extends the public mysticai/pipeline-docker image
FROM --platform=linux/amd64 mysticai/pipeline-docker:latest

# Requirements copied in from the local system and installed
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt

# Computational graphs copied in to be used
COPY ./GPTNeo.graph /app/pipelines/