refactor: use uv for dependency management
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -2,14 +2,19 @@ FROM python:3.11-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install uv
|
||||||
|
RUN pip install uv
|
||||||
|
|
||||||
# Install system deps
|
# Install system deps
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Python deps
|
# Copy project files
|
||||||
COPY backend/requirements.txt .
|
COPY backend/pyproject.toml backend/requirements.txt ./
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
# Install dependencies using uv
|
||||||
|
RUN uv pip install --system -r requirements.txt
|
||||||
|
|
||||||
# Copy code
|
# Copy code
|
||||||
COPY backend/ ./backend/
|
COPY backend/ ./backend/
|
||||||
|
|||||||
31
backend/pyproject.toml
Normal file
31
backend/pyproject.toml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[project]
|
||||||
|
name = "insightflow-backend"
|
||||||
|
version = "0.3.0"
|
||||||
|
description = "InsightFlow Backend - Knowledge Graph Platform"
|
||||||
|
requires-python = ">=3.11"
|
||||||
|
dependencies = [
|
||||||
|
"fastapi>=0.115.0",
|
||||||
|
"uvicorn[standard]>=0.32.0",
|
||||||
|
"python-multipart>=0.0.17",
|
||||||
|
"oss2>=2.18.6",
|
||||||
|
"alibabacloud-tea-openapi>=0.3.12",
|
||||||
|
"alibabacloud-tingwu20230930>=2.0.2",
|
||||||
|
"httpx>=0.27.2",
|
||||||
|
"pydantic>=2.9.2",
|
||||||
|
"python-dotenv>=1.0.1",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
dev = [
|
||||||
|
"pytest>=8.0.0",
|
||||||
|
"black>=24.0.0",
|
||||||
|
"ruff>=0.3.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 100
|
||||||
|
target-version = ['py311']
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 100
|
||||||
|
select = ["E", "F", "I"]
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
fastapi==0.115.0
|
|
||||||
uvicorn[standard]==0.32.0
|
|
||||||
python-multipart==0.0.17
|
|
||||||
oss2==2.18.6
|
|
||||||
alibabacloud-tea-openapi==0.3.12
|
|
||||||
alibabacloud-tingwu20230930==2.0.2
|
|
||||||
httpx==0.27.2
|
|
||||||
pydantic==2.9.2
|
|
||||||
python-dotenv==1.0.1
|
|
||||||
Reference in New Issue
Block a user