Methods to deploy a server using Docker.
It takes as input a folder with: - client.zip - server.zip - processing.json
It builds a Docker image and spawns a Docker container that runs the server.
This module is untested as it would require to first build the release Docker image. FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/3347
- DATE_FORMAT
delete_image(image_name: str)
Delete a Docker image.
Arguments:
image_name
(str): to name of the image to delete.
stop_container(image_name: str)
Kill all containers that use a given image.
Arguments:
image_name
(str): name of Docker image for which to stop Docker containers.
build_docker_image(path_to_model: Path, image_name: str)
Build server Docker image.
Arguments:
path_to_model
(Path): path to serialized model to serve.image_name
(str): name to give to the image.
main(path_to_model: Path, image_name: str)
Deploy function.
- Builds Docker image.
- Runs Docker server.
- Stop container and delete image.
Arguments:
path_to_model
(Path): path to model to serverimage_name
(str): name of the Docker image