Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
|
@@ -4,7 +4,14 @@ WORKDIR /app
|
|
| 4 |
|
| 5 |
COPY . .
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
EXPOSE 7860
|
| 10 |
|
|
|
|
| 4 |
|
| 5 |
COPY . .
|
| 6 |
|
| 7 |
+
# Install build tools needed by realesrgan / basicsr
|
| 8 |
+
RUN apt-get update && apt-get install -y g++ build-essential && rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Install PyTorch CPU wheels first (pre-built, no compilation needed)
|
| 11 |
+
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
| 12 |
+
|
| 13 |
+
# Install the rest (realesrgan will now have the build tools it needs)
|
| 14 |
+
RUN pip install --no-cache-dir --no-build-isolation fastapi uvicorn python-multipart pillow realesrgan
|
| 15 |
|
| 16 |
EXPOSE 7860
|
| 17 |
|