Spaces:
Runtime error
Runtime error
samyakkhatua
commited on
Commit
•
06ab76a
1
Parent(s):
4a173ac
Add application file
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# FROM python:3.10.9
|
2 |
+
|
3 |
+
# WORKDIR /
|
4 |
+
|
5 |
+
# COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
# RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
8 |
+
|
9 |
+
# COPY . .
|
10 |
+
|
11 |
+
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
12 |
+
|
13 |
+
# Use the official Python 3.10.9 image
|
14 |
+
FROM python:3.10.9
|
15 |
+
|
16 |
+
# Copy the current directory contents into the container at .
|
17 |
+
COPY . .
|
18 |
+
|
19 |
+
# Set the working directory to /
|
20 |
+
WORKDIR /
|
21 |
+
|
22 |
+
# Install requirements.txt
|
23 |
+
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
24 |
+
|
25 |
+
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
26 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|