Spaces:
Running
Running
Add Dockerfile to deploy AUTOMATIC1111 Stable Diffusion WebUI
Browse filesMinimal Dockerfile for launching the Stable Diffusion WebUI on Hugging Face Spaces with GPU support. Uses Python 3 and CUDA base image.
- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
|
| 2 |
+
|
| 3 |
+
# Set up environment
|
| 4 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
| 5 |
+
PYTHONUNBUFFERED=1 \
|
| 6 |
+
PIP_NO_CACHE_DIR=1 \
|
| 7 |
+
TZ=Etc/UTC
|
| 8 |
+
|
| 9 |
+
RUN apt-get update && apt-get install -y \
|
| 10 |
+
git python3 python3-pip python-is-python3 \
|
| 11 |
+
libgl1 libglib2.0-0 wget curl \
|
| 12 |
+
&& apt-get clean
|
| 13 |
+
|
| 14 |
+
WORKDIR /app
|
| 15 |
+
|
| 16 |
+
# Clone the repo (already in your space, so skip cloning)
|
| 17 |
+
COPY . .
|
| 18 |
+
|
| 19 |
+
# Install requirements
|
| 20 |
+
RUN pip install -r requirements.txt
|
| 21 |
+
|
| 22 |
+
# Launch the web UI
|
| 23 |
+
CMD ["python3", "launch.py", "--listen", "--port", "7860", "--enable-insecure-extension-access"]
|