blob: aad4d5c978992c8d2fc54842d305c411d72e1dca [file] [log] [blame]
Marc Kupietz1f7dd6e2024-02-05 06:45:01 +01001# Use the official Python 3.12 image
2FROM python:3.12-slim-bookworm
Marc Kupietz90db8222024-02-01 18:07:04 +01003
4# Set environment variables
5ENV PIP_CACHE_DIR="/app/.cache/pip" \
6 PYTHONPATH="PYTHONPATH:."
7ENV VIRTUAL_ENV=/app/venv
8ENV PATH="$VIRTUAL_ENV/bin:$PATH"
Marc Kupietz1f7dd6e2024-02-05 06:45:01 +01009ENV MAKEFLAGS="-j$(nproc)"
Marc Kupietz90db8222024-02-01 18:07:04 +010010
Marc Kupietz0ce98a62025-10-26 15:59:27 +010011# spaCy processing configuration
12ENV SPACY_USE_DEPENDENCIES="True"
13ENV SPACY_USE_GERMALEMMA="True"
14
Marc Kupietz90db8222024-02-01 18:07:04 +010015# Set the working directory
16COPY lib /app/lib
17COPY requirements.txt /app/requirements.txt
18COPY systems /app/systems
19COPY my_utils /app/my_utils
20WORKDIR /app
21
22# Install Python dependencies and create a virtual environment
23RUN mkdir -p "/app/logs"
24RUN python -m venv venv
Marc Kupietz1f7dd6e2024-02-05 06:45:01 +010025RUN venv/bin/pip install --upgrade pip
26RUN venv/bin/pip install -r requirements.txt
Marc Kupietz90db8222024-02-01 18:07:04 +010027RUN . venv/bin/activate && python -m spacy download de_core_news_lg
28
29# Define the entry point
30CMD ["python", "/app/systems/parse_spacy_pipe.py"]
31
32