Upload folder using huggingface_hub
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
FROM node:18-slim
|
| 2 |
|
| 3 |
# Install dependencies for building node-llama-cpp
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
|
@@ -9,6 +10,7 @@ WORKDIR /app
|
|
| 9 |
COPY package*.json ./
|
| 10 |
|
| 11 |
# Install npm dependencies
|
|
|
|
| 12 |
RUN npm install
|
| 13 |
|
| 14 |
# Copy source code
|
|
@@ -17,8 +19,7 @@ COPY . .
|
|
| 17 |
# Create models directory
|
| 18 |
RUN mkdir -p models
|
| 19 |
|
| 20 |
-
# Download the model during build
|
| 21 |
-
# Using direct download URL for speed if possible, or use node-llama-cpp pull
|
| 22 |
RUN npx --no node-llama-cpp pull --dir ./models hf:Qwen/Qwen3-1.7B-GGUF:Q8_0 --filename Qwen3-1.7B-Q8_0.gguf
|
| 23 |
|
| 24 |
# Expose the port HF expects
|
|
|
|
| 1 |
FROM node:18-slim
|
| 2 |
|
| 3 |
# Install dependencies for building node-llama-cpp
|
| 4 |
+
# ADDED: cmake is required for compiling llama.cpp
|
| 5 |
+
RUN apt-get update && apt-get install -y python3 make g++ curl cmake
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
| 10 |
COPY package*.json ./
|
| 11 |
|
| 12 |
# Install npm dependencies
|
| 13 |
+
# Note: node-llama-cpp might try to build during install
|
| 14 |
RUN npm install
|
| 15 |
|
| 16 |
# Copy source code
|
|
|
|
| 19 |
# Create models directory
|
| 20 |
RUN mkdir -p models
|
| 21 |
|
| 22 |
+
# Download the model during build
|
|
|
|
| 23 |
RUN npx --no node-llama-cpp pull --dir ./models hf:Qwen/Qwen3-1.7B-GGUF:Q8_0 --filename Qwen3-1.7B-Q8_0.gguf
|
| 24 |
|
| 25 |
# Expose the port HF expects
|