-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (24 loc) · 917 Bytes
/
Dockerfile
File metadata and controls
30 lines (24 loc) · 917 Bytes
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
# Use an official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8-slim-buster
COPY requirements.txt .
RUN apt-get update \
&& apt-get -y upgrade \
&& pip install --no-cache-dir -r requirements.txt
# Copy local code to the container image.
# WORKDIR /app
COPY server.py .
COPY sig_proc.py .
# Run as non-root
# RUN useradd --create-home appuser
# USER appuser
# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080
# Run the web service on container startup. Here we use the gunicorn
# webserver, with one worker process and 8 threads.
# For environments with multiple CPU cores, increase the number of workers
# to be equal to the cores available.
# CMD exec gunicorn --bind :$PORT --workers 1 --threads 1 --timeout 0 server:app --worker-class aiohttp.GunicornWebWorker
#EXPOSE $PORT
CMD ["python", "-u","server.py"]