FROM python:3.11-slim-bullseye

WORKDIR /app

RUN apt-get update && \
    apt-get install -y git tesseract-ocr libtesseract-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/UrloMythus/MammaMia.git .

RUN pip install --no-cache-dir -r requirements.txt

RUN pip install --no-cache-dir pytesseract

EXPOSE 8080

ENTRYPOINT ["python", "run.py"]