Spaces:
Paused
Paused
Update Dockerfile3
Browse files- Dockerfile3 +6 -5
Dockerfile3
CHANGED
|
@@ -3,24 +3,25 @@ FROM ghcr.io/ggml-org/llama.cpp:server
|
|
| 3 |
|
| 4 |
# 切换到 root 安装必要工具
|
| 5 |
USER root
|
| 6 |
-
RUN apt-get update && apt-get install -y python3-pip curl
|
| 7 |
|
| 8 |
# 创建工作目录并赋权 (Space 官方要求非 root 运行)
|
| 9 |
WORKDIR /app
|
| 10 |
RUN chmod 777 /app
|
| 11 |
|
| 12 |
|
| 13 |
-
|
| 14 |
# 使用 python 脚本下载模型,这样最稳,不需要处理复杂的 curl 参数
|
| 15 |
-
RUN python3 -c "from huggingface_hub import hf_hub_download; \
|
| 16 |
-
hf_hub_download(repo_id='Qwen/Qwen3-VL-8B-Instruct-GGUF', filename='Qwen3VL-8B-Instruct-Q4_K_M.gguf', local_dir='/app'); \
|
| 17 |
-
hf_hub_download(repo_id='Qwen/Qwen3-VL-8B-Instruct-GGUF', filename='mmproj-Qwen3VL-8B-Instruct-Q8_0.gguf', local_dir='/app')"
|
| 18 |
|
| 19 |
# 下载草稿模型 (建议用 Qwen2.5-1.5B-Instruct-GGUF 的 Q4_K_M 版本)
|
| 20 |
RUN python3 -c "from huggingface_hub import hf_hub_download; \
|
| 21 |
hf_hub_download(repo_id='Qwen/Qwen3-VL-4B-Instruct-GGUF', \
|
| 22 |
filename='Qwen3VL-4B-Instruct-Q4_K_M.gguf', local_dir='/app')"
|
| 23 |
|
|
|
|
|
|
|
| 24 |
# 切换回 user (Space 默认用户 ID 通常是 1000)
|
| 25 |
USER 1000
|
| 26 |
|
|
|
|
| 3 |
|
| 4 |
# 切换到 root 安装必要工具
|
| 5 |
USER root
|
| 6 |
+
RUN apt-get update && apt-get install -y python3-pip curl && pip install huggingface_hub
|
| 7 |
|
| 8 |
# 创建工作目录并赋权 (Space 官方要求非 root 运行)
|
| 9 |
WORKDIR /app
|
| 10 |
RUN chmod 777 /app
|
| 11 |
|
| 12 |
|
|
|
|
| 13 |
# 使用 python 脚本下载模型,这样最稳,不需要处理复杂的 curl 参数
|
| 14 |
+
#RUN python3 -c "from huggingface_hub import hf_hub_download; \
|
| 15 |
+
# hf_hub_download(repo_id='Qwen/Qwen3-VL-8B-Instruct-GGUF', filename='Qwen3VL-8B-Instruct-Q4_K_M.gguf', local_dir='/app'); \
|
| 16 |
+
# hf_hub_download(repo_id='Qwen/Qwen3-VL-8B-Instruct-GGUF', filename='mmproj-Qwen3VL-8B-Instruct-Q8_0.gguf', local_dir='/app')"
|
| 17 |
|
| 18 |
# 下载草稿模型 (建议用 Qwen2.5-1.5B-Instruct-GGUF 的 Q4_K_M 版本)
|
| 19 |
RUN python3 -c "from huggingface_hub import hf_hub_download; \
|
| 20 |
hf_hub_download(repo_id='Qwen/Qwen3-VL-4B-Instruct-GGUF', \
|
| 21 |
filename='Qwen3VL-4B-Instruct-Q4_K_M.gguf', local_dir='/app')"
|
| 22 |
|
| 23 |
+
RUN apt install nginx -y && pip install nanobot-ai
|
| 24 |
+
|
| 25 |
# 切换回 user (Space 默认用户 ID 通常是 1000)
|
| 26 |
USER 1000
|
| 27 |
|