javaeeduke commited on
Commit
cc9df64
·
verified ·
1 Parent(s): 32c4041

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -18
Dockerfile CHANGED
@@ -1,27 +1,15 @@
1
- FROM ubuntu:22.04
2
 
3
  RUN apt-get update && apt-get install -y \
4
  wget \
5
  curl \
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
9
 
10
- # 下载 llamafile 主程序
11
- RUN wget -q https://github.com/Mozilla/llamafile/releases/download/0.9.2/llamafile-0.9.2 \
12
- -O llamafile && chmod +x llamafile
13
 
14
- # 下载轻量模型(1.5B,约1.6GB,适合免费CPU)
15
- RUN wget -q https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF/resolve/main/qwen2.5-1.5b-instruct-q8_0.gguf \
16
- -O model.gguf
17
-
18
- EXPOSE 7860
19
-
20
- # HF Space 强制要求端口 7860
21
- CMD ["./llamafile", \
22
- "-m", "model.gguf", \
23
- "--host", "0.0.0.0", \
24
- "--port", "7860", \
25
- "-ngl", "0", \
26
- "-c", "4096", \
27
- "--server"]
 
1
+ FROM docker.io/library/ubuntu:22.04
2
 
3
  RUN apt-get update && apt-get install -y \
4
  wget \
5
  curl \
6
+ ca-certificates \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
  WORKDIR /app
10
 
11
+ RUN curl -L -o llamafile \
12
+ https://github.com/Mozilla-Ocho/llamafile/releases/download/0.9.2/llamafile-0.9.2 \
13
+ && chmod +x llamafile
14
 
15
+ EXPOSE 7860