Skip to content

Commit

Permalink
build: update dependencies for reforge and fix gradio-allowed-path fo…
Browse files Browse the repository at this point in the history
…r gradio 4

- Update PyTorch, TorchVision, and Xformers to newer versions in Dockerfile
- Add `--gradio-allowed-path "."` argument to the `launch.py` command in entrypoint.sh

Signed-off-by: 陳鈞 <jim60105@gmail.com>
  • Loading branch information
jim60105 committed Aug 22, 2024
1 parent f95c275 commit 25af8b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ RUN --mount=type=cache,id=pip-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/r
pip install -U --force-reinstall pip setuptools==69.5.1 wheel && \
pip install -U --extra-index-url https://download.pytorch.org/whl/cu121 --extra-index-url https://pypi.nvidia.com \
# `torch` (3.6G) and the underlying package `triton` (276M), `torchvision` is small but install together
torch==2.1.2 torchvision==0.16.2 \
torch==2.3.1 torchvision==0.18.1 \
# `xformers` (471M)
xformers==0.0.23.post1
xformers==0.0.27

# Install requirements
RUN --mount=type=cache,id=pip-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/root/.cache/pip \
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_requirements() {
--extra-index-url https://download.pytorch.org/whl/cu121 \
--extra-index-url https://pypi.nvidia.com \
-r requirements_versions.txt \
torch==2.1.2 torchvision==0.16.2 xformers==0.0.23.post1
torch==2.3.1 torchvision==0.18.1 xformers==0.0.27
pip cache purge

if [ "$(uname -m)" = "x86_64" ]; then
Expand Down Expand Up @@ -67,7 +67,7 @@ install_requirements
trap handle_sigint INT

echo "Starting WebUI with arguments: $*"
python3 /app/launch.py --listen --port 7860 --data-dir /data "$@" &
python3 /app/launch.py --listen --port 7860 --data-dir /data --gradio-allowed-path "." "$@" &
python_pid=$!
wait $python_pid

Expand Down

0 comments on commit 25af8b5

Please sign in to comment.