feat: RAG service (#1220)

This commit is contained in:
yetone
2025-02-23 01:37:26 +08:00
committed by GitHub
parent 437d36920d
commit fd84c91cdb
32 changed files with 2339 additions and 15 deletions

33
py/rag-service/Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM debian:bookworm-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
RUN uv python install 3.11
RUN uv python list
ENV PATH="/root/.uv/python/3.11/bin:$PATH"
COPY requirements.txt .
RUN uv venv --python 3.11
RUN uv pip install -r requirements.txt
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PORT=8000
EXPOSE ${PORT}
COPY . .
CMD ["uv", "run", "fastapi", "run", "src/main.py", "--workers", "3"]