Spaces:
Sleeping
Sleeping
Ezhil
commited on
Commit
·
359f62a
1
Parent(s):
c11e0d4
Changes in Dockerfile
Browse files- Dockerfile +19 -4
Dockerfile
CHANGED
|
@@ -1,5 +1,20 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python base image
|
| 2 |
+
FROM python:3.10
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the requirements file
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Copy the application code
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Expose the FastAPI default port
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Run FastAPI with Uvicorn
|
| 20 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|