KRISH09bha commited on
Commit
f80d2cf
·
verified ·
1 Parent(s): a14e3b3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -1,18 +1,21 @@
1
- # Use a minimal Python image
2
  FROM python:3.10
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy project files
8
- COPY . /app
9
 
10
  # Install dependencies
11
- RUN pip install --no-cache-dir --upgrade pip && \
12
- pip install -r requirements.txt
13
 
14
- # Expose port for FastAPI
 
 
 
15
  EXPOSE 7860
16
 
17
- # Start FastAPI with WebSockets
18
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use official Python image as base
2
  FROM python:3.10
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy the requirements file
8
+ COPY requirements.txt .
9
 
10
  # Install dependencies
11
+ RUN apt-get update && apt-get install -y libgl1-mesa-glx \
12
+ && pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy the application code
15
+ COPY . .
16
+
17
+ # Expose the API port
18
  EXPOSE 7860
19
 
20
+ # Run the application using Uvicorn
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]