Brazela commited on
Commit
c6c5df4
·
verified ·
1 Parent(s): d1f7157

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -8
Dockerfile CHANGED
@@ -4,18 +4,14 @@ WORKDIR /app
4
 
5
  COPY . .
6
 
7
- # Build tools for basicsr compilation
8
- RUN apt-get update && apt-get install -y g++ build-essential && rm -rf /var/lib/apt/lists/*
9
-
10
- # Pre-built PyTorch CPU wheels
11
  RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
12
 
13
- # Install headless OpenCV FIRST — satisfies cv2 import without needing libGL.so.1
14
- RUN pip install --no-cache-dir opencv-python-headless
15
-
16
- # Install the rest with --no-build-isolation to avoid metadata generation issues
17
  RUN pip install --no-cache-dir --no-build-isolation fastapi uvicorn python-multipart pillow realesrgan
18
 
 
 
 
 
19
  EXPOSE 7860
20
 
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
4
 
5
  COPY . .
6
 
 
 
 
 
7
  RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
8
 
 
 
 
 
9
  RUN pip install --no-cache-dir --no-build-isolation fastapi uvicorn python-multipart pillow realesrgan
10
 
11
+ # basicsr pulls in regular opencv-python which needs libGL.so.1
12
+ # Force headless over it — same cv2 module, no GUI deps
13
+ RUN pip install --no-cache-dir --force-reinstall opencv-python-headless
14
+
15
  EXPOSE 7860
16
 
17
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]