Qwen3Embedding4B / Dockerfile
VietCat's picture
fix import issue
56dcf2f
raw
history blame contribute delete
828 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
# Tạo thư mục làm việc
WORKDIR /app
# Copy code và requirements
COPY requirements.txt .
COPY app/ app/
# Cài requirements
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir llama-cpp-python --upgrade
# Tải model từ Hugging Face
RUN mkdir -p models && \
wget -O models/Qwen3Embedding4BQ4KM.gguf \
https://huggingface.co/Qwen/Qwen3-Embedding-4B-GGUF/resolve/main/Qwen3-Embedding-4B-Q4_K_M.gguf
# Chạy ứng dụng
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]