blob: 00bea0d6623e47ec26da144ef0f02e40465662f0 [file] [log] [blame]
Marc Kupietz90db8222024-02-01 18:07:04 +01001# Use the official Python 3.11 image
2FROM python:3.11-slim-bookworm
3
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"
9
10# Set the working directory
11COPY lib /app/lib
12COPY requirements.txt /app/requirements.txt
13COPY systems /app/systems
14COPY my_utils /app/my_utils
15WORKDIR /app
16
17# Install Python dependencies and create a virtual environment
18RUN mkdir -p "/app/logs"
19RUN python -m venv venv
20RUN cp $(find / -name longintrepr.h) /usr/local/include/python3.11/
21RUN venv/bin/pip install --use-pep517 -r requirements.txt
22RUN . venv/bin/activate && python -m spacy download de_core_news_lg
23
24# Define the entry point
25CMD ["python", "/app/systems/parse_spacy_pipe.py"]
26
27