devsdevline commited on
Commit
4ad5caa
·
verified ·
1 Parent(s): aed473e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -11
Dockerfile CHANGED
@@ -1,11 +1,21 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- COPY . /app
6
-
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- EXPOSE 7860
10
-
11
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies required by OpenCV
6
+ RUN apt-get update && apt-get install -y \
7
+ libgl1 \
8
+ libglib2.0-0 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy all project files
12
+ COPY . /app
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+ RUN pip install uvicorn[standard]
17
+
18
+ EXPOSE 7860
19
+
20
+ # Start FastAPI app
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]