Spaces:
Runtime error
Runtime error
Delete Dockerfile.old
Browse files- Dockerfile.old +0 -47
Dockerfile.old
DELETED
|
@@ -1,47 +0,0 @@
|
|
| 1 |
-
# Use a smaller base image if possible, but maintain CUDA compatibility
|
| 2 |
-
FROM nvidia/cuda:11.7.1-base-ubuntu22.04 AS base
|
| 3 |
-
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
-
|
| 5 |
-
# Create user and directories early to leverage caching
|
| 6 |
-
RUN adduser --disabled-password --gecos '' user && \
|
| 7 |
-
mkdir -p /content && \
|
| 8 |
-
chown -R user:user /content
|
| 9 |
-
|
| 10 |
-
# Install system dependencies efficiently
|
| 11 |
-
RUN apt-get update && \
|
| 12 |
-
apt-get install -y --no-install-recommends \
|
| 13 |
-
libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && \
|
| 14 |
-
rm -rf /var/lib/apt/lists/*
|
| 15 |
-
|
| 16 |
-
# Switch to user after system setup
|
| 17 |
-
WORKDIR /content
|
| 18 |
-
USER user
|
| 19 |
-
|
| 20 |
-
# Combine pip installations into a single layer
|
| 21 |
-
RUN pip3 install --upgrade pip==23.3.1 && \
|
| 22 |
-
pip install --no-cache-dir \
|
| 23 |
-
torchmetrics==0.11.4 \
|
| 24 |
-
numexpr \
|
| 25 |
-
httpx==0.24.1 \
|
| 26 |
-
pytorch_lightning==1.7.6 \
|
| 27 |
-
https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl \
|
| 28 |
-
--pre triton
|
| 29 |
-
|
| 30 |
-
# Clone repository and apply patches in a single step
|
| 31 |
-
RUN rm -rf stable-diffusion-webui && \
|
| 32 |
-
git clone -b v1.6 https://github.com/camenduru/stable-diffusion-webui && \
|
| 33 |
-
cd stable-diffusion-webui && \
|
| 34 |
-
sed -i 's/dict()))/dict())).cuda()/g' repositories/stable-diffusion-stability-ai/ldm/util.py && \
|
| 35 |
-
sed -i '/prepare_environment()/a os.system("sed -i -e '\''s/dict()))/dict())).cuda()/g'\'' repositories/stable-diffusion-stability-ai/ldm/util.py")' launch.py && \
|
| 36 |
-
sed -i 's/start()/#start()/g' launch.py && \
|
| 37 |
-
echo "fastapi==0.90.0" >> requirements_versions.txt && \
|
| 38 |
-
python launch.py --skip-torch-cuda-test
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
# Add Model
|
| 43 |
-
ADD --chown=user https://huggingface.co/darkstorm2150/OpenGen/resolve/main/OpenGen%20v1.0.safetensors /content/stable-diffusion-webui/models/Stable-diffusion/OpenGen%20v1.0.safetensors
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
EXPOSE 7860
|
| 47 |
-
CMD ["python", "webui.py", "--xformers", "--listen", "--disable-console-progressbars", "--enable-console-prompts", "--no-progressbar-hiding", "--ui-config-file", "/content/shared-ui-config.json", "--ui-settings-file", "/content/shared-config.json"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|