anujakkulkarni commited on
Commit
96901e3
·
verified ·
1 Parent(s): db2719f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,20 +1,18 @@
1
- # Use an official Python image
2
  FROM python:3.11-slim
3
 
4
- # Set working directory
 
 
 
 
 
5
  WORKDIR /app
6
 
7
- # Copy requirements first (to leverage Docker cache)
8
  COPY requirements.txt .
9
-
10
- # Install dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the rest of your app
14
  COPY . .
15
 
16
- # Expose port 7860 (default for HF Spaces)
17
  EXPOSE 7860
18
 
19
- # Run FastAPI using Uvicorn
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.11-slim
2
 
3
+ # Install system dependencies for OpenCV
4
+ RUN apt-get update && apt-get install -y \
5
+ libgl1 \
6
+ libglib2.0-0 \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
  WORKDIR /app
10
 
 
11
  COPY requirements.txt .
 
 
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
 
14
  COPY . .
15
 
 
16
  EXPOSE 7860
17
 
 
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]