-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkohya_webui.dockerfile
39 lines (33 loc) · 1.04 KB
/
kohya_webui.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM lockinwu/sd_base_image:v1 as base
LABEL author="[email protected]"
ENV PATH="$PATH:/home/root/.local/bin" \
DEBIAN_FRONTEND=noninteractive \
TZ=Asia/Shanghai \
PYTHONUNBUFFERED=1
# Create workspace working directory
WORKDIR /
# cp related files
COPY requirements_extra.txt \
accelerate.yaml \
start.sh \
/dependencies/
# setup start.sh
RUN ln -s /dependencies/start.sh start.sh &&\
chmod +x /start.sh && \
# init kohya
git clone https://github.com/bmaltais/kohya_ss.git /kohya_ss
# Install Kohya_ss
WORKDIR /kohya_ss
RUN python3 -m venv --system-site-packag venv && \
source venv/bin/activate && \
pip3 install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \
pip3 install -r /dependencies/requirements_extra.txt && \
pip3 install -r requirements.txt && \
pip3 install . && \
bash setup.sh &&\
pip3 cache purge && \
deactivate
# Set up the container startup script
WORKDIR /
STOPSIGNAL SIGINT
CMD [ "bash", "start.sh" ]