coderuday21 commited on
Commit
148396a
·
1 Parent(s): 2ea70af

HF: ensure pip uses binary wheels during build

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -1,5 +1,8 @@
1
  FROM python:3.11-slim
2
 
 
 
 
3
  # System dependencies for OpenCV and image processing
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
  libgl1 \
@@ -16,13 +19,13 @@ WORKDIR /app
16
 
17
  # Build-time info + cache-bust:
18
  # Changing APP_BUILD forces Docker to re-run subsequent layers (including pip install).
19
- ARG APP_BUILD=7
20
  ENV APP_BUILD=${APP_BUILD}
21
  RUN echo "Docker build start: APP_BUILD=${APP_BUILD}" && python -V
22
 
23
  # Install Python dependencies
24
  COPY requirements.txt .
25
- RUN pip install --no-cache-dir --disable-pip-version-check --default-timeout=120 -r requirements.txt -v
26
 
27
  # Copy application code
28
  COPY . .
 
1
  FROM python:3.11-slim
2
 
3
+ # Ensure build logs flush immediately (helps when HF shows “BUILDING” with no output)
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
  # System dependencies for OpenCV and image processing
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  libgl1 \
 
19
 
20
  # Build-time info + cache-bust:
21
  # Changing APP_BUILD forces Docker to re-run subsequent layers (including pip install).
22
+ ARG APP_BUILD=8
23
  ENV APP_BUILD=${APP_BUILD}
24
  RUN echo "Docker build start: APP_BUILD=${APP_BUILD}" && python -V
25
 
26
  # Install Python dependencies
27
  COPY requirements.txt .
28
+ RUN pip install --no-cache-dir --disable-pip-version-check --default-timeout=120 --prefer-binary --only-binary=:all: -r requirements.txt -v
29
 
30
  # Copy application code
31
  COPY . .