Update Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
|
@@ -43,5 +43,11 @@ EXPOSE 7860
|
|
| 43 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 44 |
ENV GRADIO_SERVER_PORT="7860"
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
# Run the application
|
| 47 |
CMD ["python", "app.py"]
|
|
|
|
| 43 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 44 |
ENV GRADIO_SERVER_PORT="7860"
|
| 45 |
|
| 46 |
+
# --- NEW MEMORY OPTIMIZATIONS ---
|
| 47 |
+
# 1. Tells PyTorch to manage memory more efficiently to prevent fragmentation
|
| 48 |
+
ENV PYTORCH_CUDA_ALLOC_CONF="expandable_segments:True"
|
| 49 |
+
# 2. Tells Pixal3D to use its built-in low VRAM mode (caps resolution at 1024 instead of 1536)
|
| 50 |
+
ENV LOW_VRAM="1"
|
| 51 |
+
|
| 52 |
# Run the application
|
| 53 |
CMD ["python", "app.py"]
|