Brazela commited on
Commit
c51e222
·
verified ·
1 Parent(s): a0543c2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -4,9 +4,17 @@ WORKDIR /app
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 spandrel pillow fastapi uvicorn python-multipart
 
 
 
 
10
 
11
  EXPOSE 7860
12
 
 
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