we2app commited on
Commit
92dbab1
·
verified ·
1 Parent(s): b5b7ab5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -8,21 +8,25 @@ RUN python3 -m venv /opt/venv
8
  ENV PATH="/opt/venv/bin:$PATH"
9
  RUN pip install -U pip huggingface_hub
10
 
11
- # Download Gemma 4 26B (via huggingface_hub)
 
 
 
12
  RUN python3 -c 'from huggingface_hub import hf_hub_download; \
 
 
13
  repo="unsloth/gemma-4-26B-A4B-it-GGUF"; \
14
- hf_hub_download(repo_id=repo, filename="gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf", local_dir="/app"); \
15
- hf_hub_download(repo_id=repo, filename="mmproj-BF16.gguf", local_dir="/app")'
16
 
17
- # Download Gemma 4 E2B + Speculative Setup (via wget into /app)
18
  RUN wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf" -O /app/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf && \
19
  wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf" -O /app/mtp-gemma-4-E2B-it.gguf && \
20
  wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mmproj-F16.gguf" -O /app/gemma-4-E2B-it-mmproj.gguf
21
 
22
- # Download Gemma 3 1B Model (via wget into /app)
23
  RUN wget "https://huggingface.co/MaziyarPanahi/gemma-3-1b-it-GGUF/resolve/main/gemma-3-1b-it.Q3_K_M.gguf" -O /app/gemma-3-1b-it.Q3_K_M.gguf
24
 
25
- # Launching with the explicit Gemma 4 26B configuration
26
  CMD ["--server", \
27
  "-m", "/app/gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf", \
28
  "--mmproj", "/app/mmproj-BF16.gguf", \
 
8
  ENV PATH="/opt/venv/bin:$PATH"
9
  RUN pip install -U pip huggingface_hub
10
 
11
+ # Define the build argument for the token
12
+ ARG HF_TOKEN
13
+
14
+ # Download Gemma 4 26B using the token to prevent the warning and rate-limiting
15
  RUN python3 -c 'from huggingface_hub import hf_hub_download; \
16
+ import os; \
17
+ token = os.getenv("HF_TOKEN") or None; \
18
  repo="unsloth/gemma-4-26B-A4B-it-GGUF"; \
19
+ hf_hub_download(repo_id=repo, filename="gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf", local_dir="/app", token=token); \
20
+ hf_hub_download(repo_id=repo, filename="mmproj-BF16.gguf", local_dir="/app", token=token)'
21
 
22
+ # Download Gemma 4 E2B + Speculative Setup
23
  RUN wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf" -O /app/gemma-4-E2B-it-qat-UD-Q4_K_XL.gguf && \
24
  wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mtp-gemma-4-E2B-it.gguf" -O /app/mtp-gemma-4-E2B-it.gguf && \
25
  wget "https://huggingface.co/unsloth/gemma-4-E2B-it-qat-GGUF/resolve/main/mmproj-F16.gguf" -O /app/gemma-4-E2B-it-mmproj.gguf
26
 
27
+ # Download Gemma 3 1B Model
28
  RUN wget "https://huggingface.co/MaziyarPanahi/gemma-3-1b-it-GGUF/resolve/main/gemma-3-1b-it.Q3_K_M.gguf" -O /app/gemma-3-1b-it.Q3_K_M.gguf
29
 
 
30
  CMD ["--server", \
31
  "-m", "/app/gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf", \
32
  "--mmproj", "/app/mmproj-BF16.gguf", \