hailtop.batch.docker.build_python_image
- hailtop.batch.docker.build_python_image(fullname, requirements=None, python_version=None, _tmp_dir='/tmp', *, show_docker_output=False)
Build a new Python image with dill and the specified pip packages installed.
Notes
This function is used to build Python images for
PythonJob
.Examples
>>> image = build_python_image('us-docker.pkg.dev/<MY_GCP_PROJECT>/hail/batch-python', ... requirements=['pandas'])
- Parameters:
fullname (
str
) – Full name of where to build the image including any repository prefix and tags if desired (default tag is latest).requirements (
Optional
[List
[str
]]) – List of pip packages to install.python_version (
Optional
[str
]) – String in the format of major_version.minor_version (ex: 3.9). Defaults to current version of Python that is running._tmp_dir (
str
) – Location to place local temporary files used while building the image.show_docker_output (
bool
) – Print the output from Docker when building / pushing the image.
- Return type:
- Returns:
Full name where built image is located.