Spaces:
Running
Running
File size: 702 Bytes
03c48e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Chọn image cơ bản (có CUDA nếu cần GPU)
FROM ubuntu:22.04
# Cài đặt các thư viện cần thiết
RUN apt-get update && apt-get install -y \
unzip wget curl python3 python3-pip
# Sao chép file binary đã build vào container
COPY llama_bin.zip /app/llama_bin.zip
WORKDIR /app
# Giải nén binaries
RUN unzip llama_bin.zip && rm llama_bin.zip && chmod +x bin/server
# Sao chép model (hoặc tải nếu cần)
COPY models /models
# Hoặc tải nếu mô hình chưa có
# RUN wget -O /models/llama-7b.gguf https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf
# Chạy server
CMD ["./bin/server", "-m", "/models/llama-7b.gguf", "-p", "8000"]
|