analytics-engine / Dockerfile
shaliz-kong
hf hangs 503 error
f0197e9
raw
history blame contribute delete
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"]