From 3db97c9c173cecb3f51a0ccd375767df024ccf28 Mon Sep 17 00:00:00 2001 From: simonmcnair <101189766+simonmcnair@users.noreply.github.com> Date: Mon, 24 Mar 2025 22:05:54 +0000 Subject: [PATCH] Update Dockerfile --- services/reforge/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/services/reforge/Dockerfile b/services/reforge/Dockerfile index d52c0c9..1e625db 100644 --- a/services/reforge/Dockerfile +++ b/services/reforge/Dockerfile @@ -62,12 +62,20 @@ ENV LD_PRELOAD=libtcmalloc.so COPY . /docker RUN pip install pydantic==1.10.21 -RUN \ +RUN if [ -d "/opt/conda/lib/python3.10" ]; then \ + echo Python 3.10 detected; \ + sed -i 's/in_app_dir = .*/in_app_dir = True/g' /opt/conda/lib/python3.10/site-packages/gradio/routes.py ;\ + elif [ -d "/opt/conda/lib/python3.11" ]; then \ + echo Python 3.11 detected; \ + sed -i 's/in_app_dir = .*/in_app_dir = True/g' /opt/conda/lib/python3.11/site-packages/gradio/routes.py ;\ + fi && \ # mv ${ROOT}/style.css ${ROOT}/user.css && \ # one of the ugliest hacks I ever wrote \ - sed -i 's/in_app_dir = .*/in_app_dir = True/g' /opt/conda/lib/python3.10/site-packages/gradio/routes.py && \ + # updated from 3.10.to 3.11 git config --global --add safe.directory '*' + + WORKDIR ${ROOT} ENV NVIDIA_VISIBLE_DEVICES=all ENV CLI_ARGS=""