blob: cde20de2f6ccbd380c73f253f8240b8802590dfc [file] [log] [blame]
# Use the official Python 3.12 image
FROM python:3.12-slim-bookworm
# Set environment variables
ENV PIP_CACHE_DIR="/app/.cache/pip" \
PYTHONPATH="PYTHONPATH:."
ENV VIRTUAL_ENV=/app/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV MAKEFLAGS="-j$(nproc)"
# Set the working directory
COPY lib /app/lib
COPY requirements.txt /app/requirements.txt
COPY systems /app/systems
COPY my_utils /app/my_utils
WORKDIR /app
# Install Python dependencies and create a virtual environment
RUN mkdir -p "/app/logs"
RUN python -m venv venv
RUN venv/bin/pip install --upgrade pip
RUN venv/bin/pip install -r requirements.txt
RUN . venv/bin/activate && python -m spacy download de_core_news_lg
# Define the entry point
CMD ["python", "/app/systems/parse_spacy_pipe.py"]