-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
25 lines (17 loc) · 819 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM continuumio/miniconda3
RUN apt update
RUN apt install -y gcc
WORKDIR /app
# Copy some files into the Docker container
ADD ./model_orchestration_and_tracking/artifacts artifacts/
ADD ./model_orchestration_and_tracking/mlruns mlruns/
COPY ["./model_deployment/conda.yaml", "./model_deployment/app_docker.py", "./"]
# Helps us to know how to load the trained model
ENV IN_A_DOCKER_CONTAINER=True
# Create conda env based on a yaml file
RUN conda env create --name credit --file conda.yaml
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "credit", "/bin/bash", "-c"]
EXPOSE 8090
# Make sure we use proper conda environment when running the gunicorn server
ENTRYPOINT [ "conda", "run", "--no-capture-output", "-n", "credit", "gunicorn", "--bind", "0.0.0.0:8090", "app_docker:server" ]