FROM python:3.10-slim WORKDIR /app # Install system deps RUN apt-get update && \ apt-get install -y nginx supervisor && \ rm -rf /var/lib/apt/lists/* # Install Python deps COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY . . # Copy configs COPY nginx.conf /etc/nginx/nginx.conf COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf # Expose HF Space port EXPOSE 7860 # Start everything CMD ["sh", "-c", "nginx && supervisord -n -c /etc/supervisor/conf.d/supervisor.conf"]