Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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
|
| 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
|
| 13 |
-
RUN mkdir -p models
|
| 14 |
|
| 15 |
# Download the model directly from Hugging Face during the Docker build
|
| 16 |
-
#
|
| 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
|