FROM python:3.11-slim

WORKDIR /app

ENV FLAG=sctf{du_b1st_gut_g3nu9_4t_w31ght_r3c0n}

RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 && rm -rf /var/lib/apt/lists/*

COPY src/requirements.txt .
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \
    pip install --no-cache-dir -r requirements.txt

COPY src/architecture.py .
COPY src/app.py .
COPY src/templates/ ./templates/
COPY src/secret/ ./secret/
COPY src/models/ ./models/

EXPOSE 5000

CMD ["python3", "app.py"]
