drrobot9 commited on
Commit
915c2e8
·
verified ·
1 Parent(s): 3c95cb7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -11
Dockerfile CHANGED
@@ -16,17 +16,8 @@ RUN pip install --no-cache-dir -r requirements.txt
16
  COPY . .
17
 
18
  # Pre-download all models at build time using snapshot_download
19
- # HF_TOKEN must be set as a build secret or Space secret
20
- ARG HF_TOKEN
21
- ENV HF_TOKEN=${HF_TOKEN}
22
-
23
  RUN python - <<'EOF'
24
- import os
25
- from huggingface_hub import snapshot_download, login
26
-
27
- token = os.environ.get("HF_TOKEN", "")
28
- if token:
29
- login(token=token)
30
 
31
  models = [
32
  "drrobot9/wav2vec2-nigerian-language-identifier-v8",
@@ -41,7 +32,7 @@ for model_id in models:
41
  print(f"Downloading {model_id}...")
42
  snapshot_download(
43
  repo_id=model_id,
44
- token=token,
45
  ignore_patterns=["*.msgpack", "*.h5", "flax_model*", "tf_model*",
46
  "rust_model*", "optimizer.pt", "rng_state*",
47
  "training_args.bin", "trainer_state.json",
 
16
  COPY . .
17
 
18
  # Pre-download all models at build time using snapshot_download
 
 
 
 
19
  RUN python - <<'EOF'
20
+ from huggingface_hub import snapshot_download
 
 
 
 
 
21
 
22
  models = [
23
  "drrobot9/wav2vec2-nigerian-language-identifier-v8",
 
32
  print(f"Downloading {model_id}...")
33
  snapshot_download(
34
  repo_id=model_id,
35
+ token=None, # Explicitly None for public models
36
  ignore_patterns=["*.msgpack", "*.h5", "flax_model*", "tf_model*",
37
  "rust_model*", "optimizer.pt", "rng_state*",
38
  "training_args.bin", "trainer_state.json",