Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +11 -9
Dockerfile
CHANGED
|
@@ -1,21 +1,23 @@
|
|
| 1 |
-
# Chọn image cơ bản
|
| 2 |
FROM ubuntu:22.04
|
| 3 |
|
| 4 |
-
# Cài đặt
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
unzip wget curl python3 python3-pip
|
| 7 |
|
| 8 |
-
# Sao chép
|
| 9 |
COPY llama_bin.zip /app/llama_bin.zip
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
# Giải nén binaries
|
| 13 |
RUN unzip llama_bin.zip && rm llama_bin.zip && chmod +x bin/server
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
-
# Hoặc tải nếu mô hình chưa có
|
| 18 |
-
# RUN wget -O /models/llama-7b.gguf https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Chọn image cơ bản
|
| 2 |
FROM ubuntu:22.04
|
| 3 |
|
| 4 |
+
# Cài đặt thư viện cần thiết
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
unzip wget curl python3 python3-pip
|
| 7 |
|
| 8 |
+
# Sao chép binary LLaMA đã build vào container
|
| 9 |
COPY llama_bin.zip /app/llama_bin.zip
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
# Giải nén binaries
|
| 13 |
RUN unzip llama_bin.zip && rm llama_bin.zip && chmod +x bin/server
|
| 14 |
|
| 15 |
+
# Tạo thư mục models
|
| 16 |
+
RUN mkdir -p /models
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
# Tải mô hình Qwen2.5-0.5B-Instruct-GGUF
|
| 19 |
+
RUN wget -O /models/qwen2.5-0.5b-instruct-q5_k_m.gguf \
|
| 20 |
+
https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/main/qwen2.5-0.5b-instruct-q5_k_m.gguf
|
| 21 |
+
|
| 22 |
+
# Chạy server với mô hình Qwen
|
| 23 |
+
CMD ["./bin/server", "-m", "/models/qwen2.5-0.5b-instruct-q5_k_m.gguf", "-p", "8000"]
|