parthmax24 commited on
Commit
18b9cc6
·
1 Parent(s): 7ecbc3f

Fix: Add libGL for OpenCV

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -5
Dockerfile CHANGED
@@ -1,17 +1,23 @@
1
- # Use a Python base image
2
  FROM python:3.9
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy all files
 
 
 
 
 
 
8
  COPY . .
9
 
10
- # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Expose the port FastAPI will run on
14
  EXPOSE 7860
15
 
16
- # Start the FastAPI app using uvicorn
17
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use official Python image
2
  FROM python:3.9
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ libgl1 \
10
+ libglib2.0-0 \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy project files
14
  COPY . .
15
 
16
+ # Install Python dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Expose the app port
20
  EXPOSE 7860
21
 
22
+ # Run the app
23
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]