Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -1,23 +1,22 @@
|
|
| 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
|
| 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
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
|
| 18 |
-
#
|
|
|
|
| 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
|
| 23 |
CMD ["./bin/llama-server", "-m", "/models/qwen2.5-0.5b-instruct-q5_k_m.gguf", "-p", "8000"]
|
|
|
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y \
|
| 4 |
unzip wget curl python3 python3-pip
|
| 5 |
|
| 6 |
+
# Sao chép binary LLaMA đã build
|
| 7 |
COPY llama_bin.zip /app/llama_bin.zip
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
# Giải nén binaries
|
| 11 |
+
RUN unzip llama_bin.zip && rm llama_bin.zip && chmod +x bin/*
|
| 12 |
|
| 13 |
+
# Đặt biến môi trường để tìm `libllama.so`
|
| 14 |
+
ENV LD_LIBRARY_PATH=/app/bin:$LD_LIBRARY_PATH
|
| 15 |
|
| 16 |
+
# Sao chép model
|
| 17 |
+
RUN mkdir -p /models
|
| 18 |
RUN wget -O /models/qwen2.5-0.5b-instruct-q5_k_m.gguf \
|
| 19 |
https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/main/qwen2.5-0.5b-instruct-q5_k_m.gguf
|
| 20 |
|
| 21 |
+
# Chạy server
|
| 22 |
CMD ["./bin/llama-server", "-m", "/models/qwen2.5-0.5b-instruct-q5_k_m.gguf", "-p", "8000"]
|