samwaugh commited on
Commit
eb7acae
·
1 Parent(s): 6f737b4

Try to fix data path

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -9
Dockerfile CHANGED
@@ -2,37 +2,33 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # System deps (for ML libraries - with corrected package names)
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  libgl1 \
8
  libgthread-2.0-0 \
9
  libglib2.0-0 \
10
  libcairo2 \
11
  libpango-1.0-0 \
12
- libpangocairo-1.0-0 \
13
  libgdk-pixbuf-xlib-2.0-0 \
14
  libffi-dev \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Install only what we need to boot the server
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Copy data to the expected /data location
22
  COPY data /data
23
 
24
- # Copy repo
25
  COPY . .
26
 
27
  # HF routes traffic to $PORT – bind to it
28
  ENV PORT=7860 PYTHONUNBUFFERED=1
29
 
30
- # Set environment variables for Phase 1
31
  ENV DATA_ROOT=/data
32
  ENV STUB_MODE=0
33
 
34
- # Create data directories
35
- RUN mkdir -p /data/artifacts /data/outputs /data/json_info /data/marker_output
36
-
37
  # Use ENTRYPOINT instead of CMD to prevent Hugging Face from overriding
38
  ENTRYPOINT ["gunicorn", "-w", "1", "-k", "gthread", "-t", "300", "-b", "0.0.0.0:7860", "backend.runner.app:app"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # System deps (for ML libraries)
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  libgl1 \
8
  libgthread-2.0-0 \
9
  libglib2.0-0 \
10
  libcairo2 \
11
  libpango-1.0-0 \
 
12
  libgdk-pixbuf-xlib-2.0-0 \
13
  libffi-dev \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Install Python dependencies
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copy data FIRST (this creates the /data directory with content)
21
  COPY data /data
22
 
23
+ # Copy repo code
24
  COPY . .
25
 
26
  # HF routes traffic to $PORT – bind to it
27
  ENV PORT=7860 PYTHONUNBUFFERED=1
28
 
29
+ # Set environment variables for Phase 2 (real ML)
30
  ENV DATA_ROOT=/data
31
  ENV STUB_MODE=0
32
 
 
 
 
33
  # Use ENTRYPOINT instead of CMD to prevent Hugging Face from overriding
34
  ENTRYPOINT ["gunicorn", "-w", "1", "-k", "gthread", "-t", "300", "-b", "0.0.0.0:7860", "backend.runner.app:app"]