Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +1 -1
- app.py +2 -4
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Builder worker using Kaniko for daemonless Docker builds
|
| 2 |
-
FROM gcr.io/kaniko-project/executor:v1.
|
| 3 |
|
| 4 |
FROM python:3.11-slim
|
| 5 |
|
|
|
|
| 1 |
# Builder worker using Kaniko for daemonless Docker builds
|
| 2 |
+
FROM gcr.io/kaniko-project/executor:v1.23.2 AS kaniko
|
| 3 |
|
| 4 |
FROM python:3.11-slim
|
| 5 |
|
app.py
CHANGED
|
@@ -234,13 +234,11 @@ def build_and_push(
|
|
| 234 |
cmd.append(f"--build-arg={key}={value}")
|
| 235 |
|
| 236 |
# Kaniko options
|
| 237 |
-
# Note: caching disabled due to HF Space network issues with GHCR
|
| 238 |
cmd.extend([
|
| 239 |
-
"--cache=false",
|
|
|
|
| 240 |
"--ignore-path=/product_uuid",
|
| 241 |
"--ignore-path=/sys",
|
| 242 |
-
"--skip-unused-stages=false", # Force all stages to build
|
| 243 |
-
"--force", # Force rebuild even if unchanged
|
| 244 |
])
|
| 245 |
|
| 246 |
log(f"Executing: {' '.join(cmd[:5])}...")
|
|
|
|
| 234 |
cmd.append(f"--build-arg={key}={value}")
|
| 235 |
|
| 236 |
# Kaniko options
|
|
|
|
| 237 |
cmd.extend([
|
| 238 |
+
"--cache=false", # Disabled due to HF Space network issues
|
| 239 |
+
"--snapshot-mode=time", # Use mtime instead of checksums (faster)
|
| 240 |
"--ignore-path=/product_uuid",
|
| 241 |
"--ignore-path=/sys",
|
|
|
|
|
|
|
| 242 |
])
|
| 243 |
|
| 244 |
log(f"Executing: {' '.join(cmd[:5])}...")
|