Spaces:
Running
Running
moving to uv
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -19,16 +19,17 @@ RUN apt-get update && apt-get install -y \
|
|
| 19 |
git \
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
-
#
|
|
|
|
|
|
|
| 23 |
COPY backend/pyproject.toml backend/requirements.txt* ./backend/
|
| 24 |
-
# Check if requirements.txt exists and install it, else install from pyproject.toml
|
| 25 |
RUN cd backend && \
|
| 26 |
-
if [ -f requirements.txt ]; then pip install --no-cache
|
| 27 |
-
pip install --no-cache
|
| 28 |
|
| 29 |
# Copy backend code
|
| 30 |
COPY backend/ ./backend/
|
| 31 |
-
RUN cd backend && pip install -e .
|
| 32 |
|
| 33 |
# Copy built frontend from the frontend-builder stage
|
| 34 |
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist
|
|
|
|
| 19 |
git \
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
+
# Install uv and backend requirements
|
| 23 |
+
RUN pip install --no-cache-dir uv
|
| 24 |
+
|
| 25 |
COPY backend/pyproject.toml backend/requirements.txt* ./backend/
|
|
|
|
| 26 |
RUN cd backend && \
|
| 27 |
+
if [ -f requirements.txt ]; then uv pip install --system --no-cache -r requirements.txt; fi && \
|
| 28 |
+
uv pip install --system --no-cache uvicorn fastapi
|
| 29 |
|
| 30 |
# Copy backend code
|
| 31 |
COPY backend/ ./backend/
|
| 32 |
+
RUN cd backend && uv pip install --system -e .
|
| 33 |
|
| 34 |
# Copy built frontend from the frontend-builder stage
|
| 35 |
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist
|