-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (22 loc) · 827 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
FROM python:3.12-slim-bookworm
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y \
gcc \
git \
libpq-dev \
libsqlite3-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements.txt
# Remove psycopg to install optimized local build later.
RUN awk '!/psycopg/' requirements.txt > tmpfile && mv tmpfile requirements.txt
RUN pip install --upgrade pip --no-cache-dir
RUN pip install -r requirements.txt --no-cache-dir
# Install psycopg3 optimized local build.
RUN pip install psycopg[c,pool] --no-cache-dir
COPY rs2simulator/ ./rs2simulator/
COPY gunicorn.conf.py .
EXPOSE 8000
CMD ["gunicorn", "app:server", "--chdir", \
"rs2simulator", "--workers", "3", "--threads", "2", "--preload", \
"--max-requests", "1000", "--max-requests-jitter", "250"]