AdarshDRC commited on
Commit
f2a5eb4
·
1 Parent(s): bcad0bb

fix: build issues

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -2,6 +2,12 @@
2
 
3
  FROM python:3.10-slim
4
 
 
 
 
 
 
 
5
  WORKDIR /app
6
 
7
  # ── System deps ───────────────────────────────────────────────────
@@ -19,12 +25,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
19
  curl \
20
  && rm -rf /var/lib/apt/lists/*
21
 
22
- # ── HF_TOKEN build arg ────────────────────────────────────────────
23
- # Add HF_TOKEN to HF Space -> Settings -> Repository Secrets.
24
- # HF Spaces passes Repository Secrets as Docker build ARGs automatically.
25
- ARG HF_TOKEN=""
26
- ENV HF_TOKEN=${HF_TOKEN}
27
-
28
  # ── Python deps ───────────────────────────────────────────────────
29
  COPY requirements.txt .
30
  RUN pip install --no-cache-dir --compile -r requirements.txt
 
2
 
3
  FROM python:3.10-slim
4
 
5
+ # ── HF_TOKEN — must be declared immediately after FROM ──────────
6
+ # ARG before any RUN step so HF Spaces build secrets are available.
7
+ ARG HF_TOKEN=""
8
+ ENV HF_TOKEN=${HF_TOKEN}
9
+
10
+
11
  WORKDIR /app
12
 
13
  # ── System deps ───────────────────────────────────────────────────
 
25
  curl \
26
  && rm -rf /var/lib/apt/lists/*
27
 
 
 
 
 
 
 
28
  # ── Python deps ───────────────────────────────────────────────────
29
  COPY requirements.txt .
30
  RUN pip install --no-cache-dir --compile -r requirements.txt