concrete.ml.deployment.deploy_to_docker.md

module concrete.ml.deployment.deploy_to_docker

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

Global Variables

  • DATE_FORMAT


function delete_image

delete_image(image_name: str)

Delete a Docker image.

Arguments:

  • image_name (str): to name of the image to delete.


function stop_container

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.


function build_docker_image

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.


function main

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 server

  • image_name (str): name of the Docker image

Last updated