aether-taskflow / Dockerfile
Nithin1026's picture
Initial submit (#1)
9a28110
Raw
History Blame Contribute Delete
848 Bytes
FROM python:3.11-slim
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements first for layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# HuggingFace Spaces requires port 7860
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD curl -f http://localhost:7860/health || exit 1
# Environment defaults (can be overridden at runtime)
ENV AETHER_DIFFICULTY=easy
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
# Start the FastAPI server via uvicorn on port 7860 (required by HuggingFace Spaces)
CMD ["python", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]