tjwrld commited on
Commit
0c96772
·
verified ·
1 Parent(s): 942eb46

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -2,25 +2,25 @@ FROM node:22
2
 
3
  SHELL ["/bin/bash", "-c"]
4
 
5
- # Install build dependencies and wget for downloading the model
6
  RUN apt-get update && \
7
  apt-get install -y --no-install-recommends git cmake clang libgomp1 wget ca-certificates && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
  WORKDIR /opt/app
11
 
12
- # Create a models directory
13
- RUN mkdir -p models
14
 
15
  # Download the model directly from Hugging Face during the Docker build
16
- # Notice the '/resolve/' in the URL which triggers the actual file download
17
  RUN wget -qO models/gemma-3-1b-it-UD-IQ1_S.gguf "https://huggingface.co/unsloth/gemma-3-1b-it-GGUF/resolve/main/gemma-3-1b-it-UD-IQ1_S.gguf?download=true"
18
 
19
  # Copy package files and install dependencies
20
  COPY package*.json ./
21
  RUN npm install
22
 
23
- # Copy the rest of the application code
24
  COPY . .
25
 
26
  # Expose the standard Hugging Face Spaces port
 
2
 
3
  SHELL ["/bin/bash", "-c"]
4
 
5
+ # Install build dependencies and wget for model downloading
6
  RUN apt-get update && \
7
  apt-get install -y --no-install-recommends git cmake clang libgomp1 wget ca-certificates && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
  WORKDIR /opt/app
11
 
12
+ # Create necessary directories
13
+ RUN mkdir -p models public
14
 
15
  # Download the model directly from Hugging Face during the Docker build
16
+ # Use /resolve/ to get the actual file stream
17
  RUN wget -qO models/gemma-3-1b-it-UD-IQ1_S.gguf "https://huggingface.co/unsloth/gemma-3-1b-it-GGUF/resolve/main/gemma-3-1b-it-UD-IQ1_S.gguf?download=true"
18
 
19
  # Copy package files and install dependencies
20
  COPY package*.json ./
21
  RUN npm install
22
 
23
+ # Copy the rest of the application code (including server.js and the public folder)
24
  COPY . .
25
 
26
  # Expose the standard Hugging Face Spaces port