-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (27 loc) · 1.01 KB
/
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
25
26
27
28
29
30
31
32
33
34
# A generic API container for running Azure ML model workloads
#
# Description: This dockerfile builds an generic API container image. The API is an Python application and exposes an
# endpoint for serving Azure ML models and predicting outcomes.
#
# NOTES:
#
#
FROM continuumio/miniconda3
MAINTAINER Ganesh Radhakrishnan ganrad01@gmail.com
WORKDIR /app
# Update OS and install gcc
RUN apt-get update
# 'cc1' library is required to compile pre-processed C files into assembly code!
RUN apt-get -y install --reinstall build-essential
RUN apt-get -y install gcc
# Create the environment:
COPY project_env.yml .
RUN conda env create -f project_env.yml
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "project_environment", "/bin/bash", "-c"]
# Copy all the application files to /app
COPY . .
# Expose flask default listen port (5000)
EXPOSE 5000
# Run the application when container is started
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "project_environment", "python", "main-generic.py"]