FROM python:3.11-slim-bookworm # Only Redis + supervisor needed (no compilers — we use the public Piston API) RUN apt-get update && apt-get install -y --no-install-recommends \ redis-server \ supervisor \ curl \ ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Supervisor config RUN mkdir -p /etc/supervisor/conf.d/ && \ cp supervisord.conf /etc/supervisor/conf.d/supervisord.conf ENV PYTHONUNBUFFERED=1 # Hugging Face Spaces port EXPOSE 7860 CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]