Pix-Agent / Dockerfile
Cuong2004's picture
update model embedding, fix dockerfile
9f47688
raw
history blame contribute delete
807 Bytes
FROM python:3.11-slim
WORKDIR /app
# Cài đặt các gói hệ thống cần thiết (tối giản, tương thích Debian trixie)
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
gcc \
python3-dev \
libpq-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Sao chép các file yêu cầu trước để tận dụng cache của Docker
COPY requirements.txt .
# Cài đặt các gói Python
RUN pip install --no-cache-dir -r requirements.txt
# Ensure langchain-core is installed
RUN pip install --no-cache-dir langchain-core==0.1.19
# Sao chép toàn bộ code vào container
COPY . .
# Mở cổng mà ứng dụng sẽ chạy
EXPOSE 7860
# Chạy ứng dụng với uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]