FROM python:3.10-slim # Install Redis + Supervisor RUN apt-get update && apt-get install -y redis-server supervisor && rm -rf /var/lib/apt/lists/* # Install deps COPY requirements.txt /tmp/ RUN pip install --no-cache-dir torch==2.2.2 --index-url https://download.pytorch.org/whl/cpu RUN pip install --no-cache-dir -r /tmp/requirements.txt # Copy app COPY . /app WORKDIR /app # ✅ Create config in standard location (HF builder compatible) RUN mkdir -p /etc/supervisor/conf.d COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # ✅ Explicitly expose only port 7860 EXPOSE 7860 # ✅ Use supervisord directly with full path CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]