Spaces:
Sleeping
Sleeping
Sahil Garg
commited on
Commit
·
bf58b8e
1
Parent(s):
12e5e2a
Fix Dockerfile: add COPY command and correct CMD
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
|
@@ -5,6 +5,12 @@ FROM python:3.11-slim
|
|
| 5 |
# Set working directory
|
| 6 |
WORKDIR /app
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# -------------------------------
|
| 9 |
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y \
|
|
@@ -43,5 +49,5 @@ ENV PYTHONUNBUFFERED=1
|
|
| 43 |
EXPOSE 8000
|
| 44 |
|
| 45 |
# -------------------------------
|
| 46 |
-
# Start FastAPI
|
| 47 |
-
CMD ["uvicorn", "app
|
|
|
|
| 5 |
# Set working directory
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# Copy all application files
|
| 9 |
+
COPY . .
|
| 10 |
+
|
| 11 |
+
# List files for debugging
|
| 12 |
+
RUN ls -la /app
|
| 13 |
+
|
| 14 |
# -------------------------------
|
| 15 |
# Install system dependencies
|
| 16 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 49 |
EXPOSE 8000
|
| 50 |
|
| 51 |
# -------------------------------
|
| 52 |
+
# Start FastAPI app from app.py
|
| 53 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|