Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
# Use the official Python image
|
| 4 |
FROM python:3.10
|
| 5 |
|
|
@@ -12,8 +10,11 @@ COPY . /app
|
|
| 12 |
# Install dependencies
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
|
|
|
|
|
|
|
|
|
| 15 |
# Expose the FastAPI port
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
# Run FastAPI with Uvicorn
|
| 19 |
-
CMD ["uvicorn", "
|
|
|
|
|
|
|
|
|
|
| 1 |
# Use the official Python image
|
| 2 |
FROM python:3.10
|
| 3 |
|
|
|
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Ensure Uvicorn is installed explicitly
|
| 14 |
+
RUN pip install fastapi uvicorn
|
| 15 |
+
|
| 16 |
# Expose the FastAPI port
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
# Run FastAPI with Uvicorn
|
| 20 |
+
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
|