feat: add aiprovider service foundation

This commit is contained in:
linkong
2026-04-07 17:30:27 +08:00
parent 3f5505f03e
commit 9a50e72bd1
42 changed files with 1766 additions and 166 deletions

View File

@@ -1,19 +1,24 @@
FROM python:3.11-slim
FROM python:3.14-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV UV_COMPILE_BYTECODE=1
ENV UV_LINK_MODE=copy
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY pyproject.toml uv.lock /app/
RUN uv sync --frozen --no-dev
COPY . .
COPY backend /app/backend
COPY VERSION /app/VERSION
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
CMD ["uv", "run", "--frozen", "--no-dev", "--project", "/app", "python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]