CoolWasteAI / Dockerfile
Celvin
Prepare deployable AI API for competition and free hosting
12d831f
Raw
History Blame Contribute Delete
604 Bytes
FROM python:3.10-slim
WORKDIR /app
ENV PORT=7860
ENV PYTHONUNBUFFERED=1
# System deps for OpenCV headless
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 libsm6 libxrender1 libxext6 curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements-deploy.txt .
RUN pip install --no-cache-dir -r requirements-deploy.txt
COPY app/ ./app/
COPY models/ ./models/
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD curl -f http://localhost:${PORT}/health || exit 1
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT} --workers 1"]