kadirnar commited on
Commit
df68f30
1 Parent(s): d0b55be

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -11
Dockerfile CHANGED
@@ -1,23 +1,49 @@
1
- FROM nvidia/cuda:12.2.0-base-ubuntu22.04
2
- ENV DEBIAN_FRONTEND noninteractive
3
 
4
- RUN apt-get update -y && \
5
- apt-get install -y aria2 libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && \
6
- pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 && \
7
- pip install xformers==0.0.20 triton==2.0.0 packaging==23.1 && \
8
- adduser --disabled-password --gecos '' user && \
9
- mkdir /content && \
10
- chown -R user:user /content
11
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  WORKDIR /content
 
 
 
13
  USER user
 
 
 
 
 
 
14
 
15
- RUN git clone -b v2.6 https://github.com/camenduru/stable-diffusion-webui /content/test && \
 
 
 
 
 
 
 
 
 
 
16
  git clone https://github.com/etherealxx/batchlinks-webui /content/test/extensions/batchlinks-webui && \
17
  sed -i -e 's/ start()/ #start()/g' /content/test/launch.py && \
18
  cd /content/test && \
19
  python launch.py --skip-torch-cuda-test && \
20
  git reset --hard
21
 
22
- # RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd15/resolve/main/v1-5-pruned-emaonly.ckpt -d /content/test/models/Stable-diffusion -o v1-5-pruned-emaonly.ckpt
 
23
  CMD cd /content/test && python launch.py --xformers --cors-allow-origins=* --api
 
1
+ FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
 
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ TZ=America/Los_Angeles
 
 
 
 
 
5
 
6
+ ARG USE_PERSISTENT_DATA
7
+
8
+ RUN apt-get update && apt-get install -y \
9
+ git libgl1 libglib2.0-0 \
10
+ make build-essential libssl-dev zlib1g-dev \
11
+ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
12
+ libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git git-lfs \
13
+ ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
14
+ && rm -rf /var/lib/apt/lists/* \
15
+ && git lfs install \
16
+ apt-get install nvidia-container-runtime
17
+
18
  WORKDIR /content
19
+
20
+ # User
21
+ RUN useradd -m -u 1000 user
22
  USER user
23
+ ENV HOME=/home/user \
24
+ PATH=/home/user/.local/bin:$PATH
25
+
26
+ # Pyenv
27
+ RUN curl https://pyenv.run | bash
28
+ ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
29
 
30
+ ARG PYTHON_VERSION=3.10.12
31
+ # Python
32
+ RUN pyenv install $PYTHON_VERSION && \
33
+ pyenv global $PYTHON_VERSION && \
34
+ pyenv rehash && \
35
+ pip install --no-cache-dir --upgrade pip setuptools wheel && \
36
+ pip install --no-cache-dir \
37
+ datasets \
38
+ huggingface-hub "protobuf<4" "click<8.1"
39
+
40
+ RUN git clone -b v3.0 https://github.com/camenduru/stable-diffusion-webui /content/test && \
41
  git clone https://github.com/etherealxx/batchlinks-webui /content/test/extensions/batchlinks-webui && \
42
  sed -i -e 's/ start()/ #start()/g' /content/test/launch.py && \
43
  cd /content/test && \
44
  python launch.py --skip-torch-cuda-test && \
45
  git reset --hard
46
 
47
+ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd15/resolve/main/v1-5-pruned-emaonly.ckpt -d /content/test/models/Stable-diffusion -o v1-5-pruned-emaonly.ckpt
48
+
49
  CMD cd /content/test && python launch.py --xformers --cors-allow-origins=* --api