File size: 1,144 Bytes
e103758
c204b72
 
 
758cab0
c204b72
645915f
c204b72
 
 
 
7f39dd5
c204b72
a5a3bae
 
8facdeb
7f39dd5
227f9d2
8b31674
 
3eac2c7
8b31674
c592614
 
 
 
 
8b31674
3eac2c7
8facdeb
a3c6cfc
4eddb00
861bb17
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
FROM ubuntu:22.04

# 必要なパッケージをインストール
RUN apt-get update && apt-get install -y \
    git wget python3 python3-pip sudo && \
    apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip install torch==2.3.1 torchvision==0.18.1
# Pythonのデフォルト実行ファイルをpython3に変更
RUN ln -s /usr/bin/python3 /usr/bin/python

# リポジトリをクローン
WORKDIR /app

RUN git config --global --add safe.directory /app

# app.py をコンテナにコピー
COPY . .
RUN export COMMANDLINE_ARGS="--skip-torch-cuda-test"

RUN mkdir -p ~/.cache/pip
RUN chmod 777 ~/.cache/pip && mkdir -p /root/.cache/pip && sudo chown -R $(whoami):$(whoami) ~/.cache/pip

RUN export PIP_CACHE_DIR=~/pip-cache

RUN mkdir -p ~/pip-cache
RUN chmod 777 ~/pip-cache && mkdir -p /root/pip-cache && sudo chown -R $(whoami):$(whoami) ~/pip-cache

RUN mkdir -p ~/.local
RUN chmod 777 ~/.local && mkdir -p /root/.local && sudo chown -R $(whoami):$(whoami) ~/.local
# WebUIの起動(app.pyを実行)
WORKDIR /app/stable-diffusion-webui-forge
CMD ["python3", "launch.py", "--share", "--disable-torch-cuda", "--skip-torch-cuda-test"]