refactor: use uv sync with lock file
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -3,23 +3,27 @@ FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
|
||||
# Install uv
|
||||
RUN pip install uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
# Install system deps
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ffmpeg \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy project files
|
||||
COPY backend/pyproject.toml backend/requirements.txt ./
|
||||
COPY backend/pyproject.toml backend/uv.lock ./
|
||||
|
||||
# Install dependencies using uv
|
||||
RUN uv pip install --system -r requirements.txt
|
||||
# Install dependencies using uv sync
|
||||
RUN uv sync --frozen --no-install-project
|
||||
|
||||
# Copy code
|
||||
COPY backend/ ./backend/
|
||||
COPY frontend/ ./frontend/
|
||||
|
||||
# Install project
|
||||
RUN uv sync --frozen
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python", "backend/main.py"]
|
||||
CMD ["uv", "run", "python", "backend/main.py"]
|
||||
|
||||
Reference in New Issue
Block a user