Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +15 -3
Dockerfile
CHANGED
@@ -1,4 +1,16 @@
|
|
1 |
-
FROM
|
2 |
-
COPY index.html /usr/share/nginx/html/
|
3 |
-
EXPOSE 7860
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
|
|
|
|
2 |
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# Install dependencies
|
6 |
+
COPY requirements.txt .
|
7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
+
|
9 |
+
# Copy the FastAPI application
|
10 |
+
COPY main.py .
|
11 |
+
|
12 |
+
# Expose the port
|
13 |
+
EXPOSE 8000
|
14 |
+
|
15 |
+
# Command to run the application
|
16 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|