FROM python:3.9-slim | |
WORKDIR /app | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
curl \ | |
git \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY requirements.txt ./ | |
COPY src/ ./src/ | |
RUN pip3 install --no-cache-dir -r requirements.txt | |
EXPOSE 7860 | |
# Optional: simple root healthcheck (replace with your own endpoint if needed) | |
HEALTHCHECK CMD curl --fail http://localhost:7860 || exit 1 | |
ENTRYPOINT ["python", "src/app.py"] | |