ChoruYt commited on
Commit
f147305
·
verified ·
1 Parent(s): 56f52c6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends gcc libc6-dev &
5
 
6
  WORKDIR /app
7
 
8
- # Install Python dependencies (added huggingface_hub which includes the CLI)
9
  RUN pip install --no-cache-dir flask flask-cors Pillow litert-lm huggingface_hub
10
 
11
  # Create dummy Vulkan library to satisfy litert-lm on CPU
@@ -16,9 +16,8 @@ RUN printf 'void vkGetInstanceProcAddr(){}\nvoid vkCreateInstance(){}\nvoid vkDe
16
  # Create model directory
17
  RUN mkdir -p /app/models/gemma
18
 
19
- # --- KEY CHANGE: Download the model during the Docker build ---
20
- # This bakes the model into your Hugging Face Space image
21
- RUN huggingface-cli download litert-community/gemma-4-E2B-it-litert-lm gemma-4-E2B-it.litertlm --local-dir /app/models/gemma
22
 
23
  # Copy the server code
24
  COPY server.py .
@@ -31,7 +30,6 @@ USER user
31
  # Set environment variables
32
  ENV PORT=7860
33
  ENV LD_LIBRARY_PATH=/app
34
- # --- KEY CHANGE: Point the Python script directly to the baked-in model ---
35
  ENV GEMMA_MODEL_PATH=/app/models/gemma/gemma-4-E2B-it.litertlm
36
 
37
  EXPOSE 7860
 
5
 
6
  WORKDIR /app
7
 
8
+ # Install Python dependencies
9
  RUN pip install --no-cache-dir flask flask-cors Pillow litert-lm huggingface_hub
10
 
11
  # Create dummy Vulkan library to satisfy litert-lm on CPU
 
16
  # Create model directory
17
  RUN mkdir -p /app/models/gemma
18
 
19
+ # --- KEY FIX: Use the new 'hf' command instead of 'huggingface-cli' ---
20
+ RUN hf download litert-community/gemma-4-E2B-it-litert-lm gemma-4-E2B-it.litertlm --local-dir /app/models/gemma
 
21
 
22
  # Copy the server code
23
  COPY server.py .
 
30
  # Set environment variables
31
  ENV PORT=7860
32
  ENV LD_LIBRARY_PATH=/app
 
33
  ENV GEMMA_MODEL_PATH=/app/models/gemma/gemma-4-E2B-it.litertlm
34
 
35
  EXPOSE 7860