-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (29 loc) · 937 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
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory
WORKDIR /opt/improver
# Install dependencies
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
curl \
ffmpeg \
; \
rm -rf /var/lib/apt/lists/*
# Install Python packages
COPY requirements.txt /opt/improver/
RUN pip install --upgrade pip && pip install -r requirements.txt
# Create necessary directories
RUN mkdir /opt/improver/logs
RUN mkdir /config
# Copy config file
#COPY config/py-config-gs.json /config/py-config-gs.json
# Make port 5001 available to the world outside this container
EXPOSE 5001
# Define environment variables for Flask
# Pointing to the app directory
ENV FLASK_APP=app
# Change to "development" or "production" if necessary
ENV FLASK_ENV=development
# Run Gunicorn to serve the app
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5001", "app:create_app()"]