Pratap-K commited on
Commit
093787f
·
1 Parent(s): 98fc9b6

Fix HF Docker Build

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -39,20 +39,14 @@ RUN if ! command -v uv >/dev/null 2>&1; then \
39
  fi
40
 
41
  # Install dependencies using uv sync
42
- # If uv.lock exists, use it; otherwise resolve on the fly
43
  RUN --mount=type=cache,target=/root/.cache/uv \
44
- if [ -f uv.lock ]; then \
45
- uv sync --frozen --no-install-project --no-editable; \
46
- else \
47
- uv sync --no-install-project --no-editable; \
48
- fi
49
 
50
  RUN --mount=type=cache,target=/root/.cache/uv \
51
- if [ -f uv.lock ]; then \
52
- uv sync --frozen --no-editable; \
53
- else \
54
- uv sync --no-editable; \
55
- fi
56
 
57
  # Final runtime stage
58
  FROM ${BASE_IMAGE}
 
39
  fi
40
 
41
  # Install dependencies using uv sync
42
+ # Bypass Windows generated lock files to securely build native Linux wheels on HF Spaces
43
  RUN --mount=type=cache,target=/root/.cache/uv \
44
+ rm -f uv.lock && \
45
+ uv sync --no-install-project --no-editable
 
 
 
46
 
47
  RUN --mount=type=cache,target=/root/.cache/uv \
48
+ rm -f uv.lock && \
49
+ uv sync --no-editable
 
 
 
50
 
51
  # Final runtime stage
52
  FROM ${BASE_IMAGE}