PhoGPT4BChat / Dockerfile
VietCat's picture
init project
96a96cd
raw
history blame contribute delete
812 Bytes
FROM python:3.10-slim
# Cài công cụ cần thiết để build llama-cpp-python
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
wget \
curl \
&& rm -rf /var/lib/apt/lists/*
# Cập nhật pip
RUN pip install --upgrade pip
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir llama-cpp-python --upgrade
# Tải model GGUF từ Hugging Face Hub (ví dụ: TheBloke's repo)
# Thay đổi URL và tên file nếu bạn dùng repo khác
RUN mkdir -p models && \
wget -O models/PhoGPT4BChat_Q4KM.gguf \
https://huggingface.co/vinai/PhoGPT-4B-Chat-gguf/resolve/main/PhoGPT-4B-Chat-Q4_K_M.gguf
COPY ./app ./app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]