tinyLlama1B / Dockerfile
VietCat's picture
Fix building error
56ad5c9
raw
history blame contribute delete
758 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
# 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/tinyllama.gguf https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q8_0.gguf
COPY ./app ./app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]