pipeline.docker.create_dockerfile
create_dockerfile - function
pipeline.docker.create_dockerfile(
pipeline_graph_paths: List[str],
*,
output_dir: str = "./",
platform: str = "linux/amd64",
requirements: Optional[str] = None,
)
Description
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.
Parameters
pipeline_graph_paths
(List[str]
) - serialised graph paths to include in the docker image.output_dir
(str
, optional) - the output location for the createdDockerfile
.platform
(str
, optional) - target platform to construct for in theDockerfile
.requirements
(str
, optional) - path to arequirements.txt
file to install in theDockerfile
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/
Updated 10 months ago