blob: cde20de2f6ccbd380c73f253f8240b8802590dfc [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
11# Set the working directory
12COPY lib /app/lib
13COPY requirements.txt /app/requirements.txt
14COPY systems /app/systems
15COPY my_utils /app/my_utils
16WORKDIR /app
17
18# Install Python dependencies and create a virtual environment
19RUN mkdir -p "/app/logs"
20RUN python -m venv venv
Marc Kupietz1f7dd6e2024-02-05 06:45:01 +010021RUN venv/bin/pip install --upgrade pip
22RUN venv/bin/pip install -r requirements.txt
Marc Kupietz90db8222024-02-01 18:07:04 +010023RUN . venv/bin/activate && python -m spacy download de_core_news_lg
24
25# Define the entry point
26CMD ["python", "/app/systems/parse_spacy_pipe.py"]
27
28