-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (30 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
44 lines (30 loc) · 1.1 KB
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
35
36
37
38
39
40
41
42
43
44
# Dockerfile for the Face Detection Service
# Use an official Python runtime as a parent image
FROM continuumio/miniconda3
# Set the working directory to /app
WORKDIR /app
# Update Linux package lists
RUN apt-get update
# Install build tools (gcc etc.)
RUN apt-get install -y build-essential
# Install ops tools
RUN apt-get install -y procps vim
# Install any needed packages specified in requirements.txt
RUN conda install -c anaconda pyyaml
RUN conda install -c conda-forge scipy
RUN conda install -c conda-forge numpy
RUN conda install scikit-learn==0.21.3
RUN conda install -c conda-forge gevent
RUN conda install -c conda-forge gunicorn>=19.0
RUN conda install -c conda-forge falcon>=2.0
# Copy the current directory contents into the container at /app
COPY . /app
RUN pwd
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV PYTHONUNBUFFERED TRUE
ENV FACE_DETECTION_CONFIG /app/service.yaml
ENV NUM_WORKER 1
# Run Gunicorn when the container launches
CMD ["sh", "-c", "gunicorn --workers ${NUM_WORKER} --worker-class gevent --bind 0.0.0.0:80 main:app"]