Creating a Docker image for your training job
A Docker image is, in many contexts, the most critical deliverable of a model developer to a more specialized systems infrastructure team in production for a training job. The project is contained in the following folder of the repository: https://github.com/PacktPublishing/Machine-Learning-Engineering-with-MLflow/tree/master/Chapter08/psystock-training-docker. In the following steps, we will produce a ready-to-deploy Docker image of the code produced:
- You need to set up a Docker file in the root folder of the project, as shown in the following code snippet:
FROM continuumio/miniconda3:4.9.2 RUN apt-get update && apt-get install build-essential -y RUN pip install \ Â Â Â Â mlflow==1.18.0 \ Â Â Â Â pymysql==1.0.2 \ Â Â Â Â boto3 COPY ./training_project /src WORKDIR /src
- We will start by building and training the image by running the following command:
docker build -t psystock_docker_training_image...