Spaces:
Sleeping
Sleeping
mbabazif
commited on
Commit
·
f6d9b3d
1
Parent(s):
dad31ae
Add application file
Browse files- Dockerfile +6 -9
Dockerfile
CHANGED
@@ -1,22 +1,19 @@
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
# Set the working directory inside the container
|
4 |
-
WORKDIR /
|
5 |
|
6 |
# Copy the requirements.txt file into our working directory (/app) in the container
|
7 |
-
COPY requirements.txt .
|
8 |
|
9 |
# Install dependencies
|
10 |
-
RUN pip install --
|
11 |
|
12 |
|
13 |
# Copy the app.py file into our working directory (/app) in the container
|
14 |
-
COPY .
|
15 |
|
16 |
|
17 |
-
# Make port 80 available to the world outside this container
|
18 |
-
EXPOSE 80
|
19 |
-
# Command to run when the container starts
|
20 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]
|
21 |
-
|
22 |
|
|
|
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
# Set the working directory inside the container
|
4 |
+
WORKDIR /code
|
5 |
|
6 |
# Copy the requirements.txt file into our working directory (/app) in the container
|
7 |
+
COPY ./requirements.txt /code/requirements.txt
|
8 |
|
9 |
# Install dependencies
|
10 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
|
13 |
# Copy the app.py file into our working directory (/app) in the container
|
14 |
+
COPY . .
|
15 |
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
+
# Command to run when the container starts
|
19 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
|