-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 782 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 782 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
31
32
# scheduler-server
# Use ubuntu base image
FROM ubuntu:22.04
WORKDIR /app
# Ensure we're set to UTC
ENV TZ=Etc/UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install python
RUN apt-get update && apt-get install -y python3 \
python3-pip \
git
# Install dumb-init
RUN pip install dumb-init
# Copy in and install requirements
# This will leverage the cache for rebuilds when modifying the code, avoiding
# downloading all the requirements again
COPY requirements.txt /app/requirements.txt
RUN pip3 install -r requirements.txt
# Install schedlib
COPY . .
RUN pip install .
# Run server
EXPOSE 8010
ENTRYPOINT ["dumb-init", "gunicorn", "--bind", "0.0.0.0:8010", "--timeout", "480", "scheduler_server.app:app", "--max-requests", "1"]