shaliz-kong commited on
Commit
f0197e9
·
1 Parent(s): fda4b64

hf hangs 503 error

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -3,7 +3,7 @@ FROM python:3.10-slim
3
  # Install Redis + Supervisor
4
  RUN apt-get update && apt-get install -y redis-server supervisor && rm -rf /var/lib/apt/lists/*
5
 
6
- # Install PyTorch CPU (version that exists for Python 3.10)
7
  COPY requirements.txt /tmp/
8
  RUN pip install --no-cache-dir torch==2.2.2 --index-url https://download.pytorch.org/whl/cpu
9
  RUN pip install --no-cache-dir -r /tmp/requirements.txt
@@ -12,8 +12,12 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt
12
  COPY . /app
13
  WORKDIR /app
14
 
15
- # Copy supervisord config
 
16
  COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
17
 
18
- # Start
 
 
 
19
  CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
 
3
  # Install Redis + Supervisor
4
  RUN apt-get update && apt-get install -y redis-server supervisor && rm -rf /var/lib/apt/lists/*
5
 
6
+ # Install deps
7
  COPY requirements.txt /tmp/
8
  RUN pip install --no-cache-dir torch==2.2.2 --index-url https://download.pytorch.org/whl/cpu
9
  RUN pip install --no-cache-dir -r /tmp/requirements.txt
 
12
  COPY . /app
13
  WORKDIR /app
14
 
15
+ # Create config in standard location (HF builder compatible)
16
+ RUN mkdir -p /etc/supervisor/conf.d
17
  COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
18
 
19
+ # ✅ Explicitly expose only port 7860
20
+ EXPOSE 7860
21
+
22
+ # ✅ Use supervisord directly with full path
23
  CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]