-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (30 loc) · 892 Bytes
/
Dockerfile
File metadata and controls
39 lines (30 loc) · 892 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
33
34
35
36
37
38
39
# Medical Chat Sanitizer - Docker Image
FROM python:3.13-slim
# Arbeitsverzeichnis
WORKDIR /app
# Umgebungsvariablen
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
# System-Abhängigkeiten für Presidio & spaCy
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Python-Abhängigkeiten installieren
COPY pyproject.toml uv.lock ./
RUN pip install --upgrade pip && \
pip install uv && \
uv sync --frozen
# spaCy NLP-Modell herunterladen
RUN python -m spacy download de_core_news_lg
# Anwendungscode kopieren
COPY src/ ./src/
COPY main.py ./
# Port exponieren
EXPOSE 6000
# Healthcheck
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:6000/health || exit 1
# Anwendung starten
CMD ["python", "main.py"]