Spaces:
Sleeping
Sleeping
oriastanjung
commited on
Commit
•
ee97ab4
1
Parent(s):
1e44e1a
fix concurency and asyncronous request
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
@@ -4,19 +4,20 @@ FROM python:3.10.14-slim-bullseye
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
|
8 |
-
# Copy only requirements.txt to leverage Docker cache
|
9 |
COPY . .
|
10 |
|
11 |
# Install any needed packages specified in requirements.txt
|
12 |
-
RUN apt-get update -y
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
|
|
|
|
17 |
|
18 |
# Make port 5000 available to the world outside this container
|
19 |
-
EXPOSE
|
20 |
|
21 |
# Run the application
|
22 |
-
CMD ["
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy the current directory contents into the container at /app
|
|
|
8 |
COPY . .
|
9 |
|
10 |
# Install any needed packages specified in requirements.txt
|
11 |
+
RUN apt-get update -y && \
|
12 |
+
apt-get install -y libgl1-mesa-glx libglib2.0-0 && \
|
13 |
+
pip3 install --no-cache-dir -r requirements.txt && \
|
14 |
+
apt-get clean
|
15 |
|
16 |
+
# Install Uvicorn
|
17 |
+
RUN pip3 install uvicorn
|
18 |
|
19 |
# Make port 5000 available to the world outside this container
|
20 |
+
EXPOSE 7860
|
21 |
|
22 |
# Run the application
|
23 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|