Download Dockerfile from petermutwiri/analytics-engine: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/spaces/petermutwiri/analytics-engine/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/petermutwiri/analytics-engine/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/petermutwiri/analytics-engine/resolve/main/Dockerfile
718 Bytes
| 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"] |