wp6_plorabunt_be/Dockerfile

29 lines
645 B
Docker

FROM python:3.11
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client
# Pin numpy 1.x FIRST to avoid binary mismatches
RUN pip install --upgrade pip setuptools wheel && \
pip install numpy==1.26.4
# Copy and install dependencies
COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY app.py /app
COPY database_utils /app/database_utils
COPY utils /app/utils
COPY routers /app/routers
COPY d4science_public_key.pem /app
# Copy spaCy model install script
COPY script.sh /app/script.sh
RUN chmod +x /app/script.sh
EXPOSE 8004
CMD ["/app/script.sh"]