From fbdf4969a6bbc8d7afba13b0dc6b9ad4c566414f Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Sun, 10 Sep 2023 16:11:30 +0100 Subject: [PATCH] add docker file for testing prediction --- .../ml-pipeline/src/pipeline/Prediction.Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 modules/ml-pipeline/src/pipeline/Prediction.Dockerfile diff --git a/modules/ml-pipeline/src/pipeline/Prediction.Dockerfile b/modules/ml-pipeline/src/pipeline/Prediction.Dockerfile new file mode 100644 index 0000000..d8e9b6c --- /dev/null +++ b/modules/ml-pipeline/src/pipeline/Prediction.Dockerfile @@ -0,0 +1,14 @@ +# Dockerfile that can be used to test loading a model to generate a prediction (part of CI/CD flow) +FROM python:3.10.12-slim + +COPY src/requirements/prediction/requirements-dev.txt requirements.txt + +RUN pip install --upgrade pip +RUN pip install -r requirements.txt + +# Assuming in the CI/CD step, there will be a dvc pull step to get data and model, so will just need to run a single script +COPY src/ /home/src/ + +WORKDIR /home/src/ + +CMD [ "python", "generate_predictions.py"]