Spaces:
Runtime error
Runtime error
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"] | |