Spaces:
Sleeping
Sleeping
Commit ·
2ea70af
1
Parent(s): c6682be
HF: make Docker builds verbose; move APP_BUILD cache-bust before pip
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -14,12 +14,15 @@ RUN useradd -m -u 1000 appuser
|
|
| 14 |
|
| 15 |
WORKDIR /app
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# Install Python dependencies
|
| 18 |
COPY requirements.txt .
|
| 19 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
-
|
| 21 |
-
# Cache-bust: increment to force a fresh COPY on HF Spaces
|
| 22 |
-
ENV APP_BUILD=6
|
| 23 |
|
| 24 |
# Copy application code
|
| 25 |
COPY . .
|
|
|
|
| 14 |
|
| 15 |
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 . .
|