Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
@@ -1,15 +1,20 @@
|
|
|
|
1 |
FROM python:3.10
|
2 |
|
|
|
3 |
RUN useradd -m -u 1000 user
|
4 |
USER user
|
5 |
ENV PATH="/home/user/.local/bin:$PATH"
|
6 |
|
|
|
7 |
WORKDIR /app
|
8 |
|
9 |
-
|
10 |
-
|
|
|
11 |
|
|
|
12 |
COPY --chown=user . .
|
13 |
|
14 |
-
|
15 |
-
|
|
|
1 |
+
# Use Python base
|
2 |
FROM python:3.10
|
3 |
|
4 |
+
# Set up user
|
5 |
RUN useradd -m -u 1000 user
|
6 |
USER user
|
7 |
ENV PATH="/home/user/.local/bin:$PATH"
|
8 |
|
9 |
+
# Set work directory
|
10 |
WORKDIR /app
|
11 |
|
12 |
+
# Install backend dependencies
|
13 |
+
COPY --chown=user backend/requirements.txt ./requirements.txt
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
+
# Copy the entire project
|
17 |
COPY --chown=user . .
|
18 |
|
19 |
+
# ✅ IMPORTANT: Use dot notation, not slashes
|
20 |
+
CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|