-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (33 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
41 lines (33 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
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
inkscape \
libgl1 \
libglib2.0-0 \
libgomp1 \
libsm6 \
libsndfile1 \
libxext6 \
libxrender1 \
libreoffice \
poppler-utils \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends ./wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
&& rm wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
&& rm -rf /var/lib/apt/lists/*
COPY requirements-base.txt requirements-paper.txt requirements-paper-backup.txt ./
RUN pip install --upgrade pip && \
(pip install -r requirements-paper.txt || pip install -r requirements-paper-backup.txt)
COPY . .
EXPOSE 8000
CMD ["uvicorn", "fastapi_app.main:app", "--host", "0.0.0.0", "--port", "8000"]