Spaces:
Runtime error
Runtime error
imalexianne
commited on
Commit
·
6d82fb7
1
Parent(s):
c9d2edf
add Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python image
|
2 |
+
FROM python:3.8
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy the requirements file into the container
|
8 |
+
COPY requirements.txt ./
|
9 |
+
|
10 |
+
# Install any needed packages specified in requirements.txt
|
11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
+
|
13 |
+
# Copy the current directory contents into the container at /app
|
14 |
+
COPY . .
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
# Make port 8000 available to what fastapi will run on
|
19 |
+
EXPOSE 7860
|
20 |
+
|
21 |
+
##command to run fastapi when conatiner starts
|
22 |
+
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
23 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|