aboutsummaryrefslogtreecommitdiffstats
path: root/launch.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-10-15 07:35:18 +0000
committerGitHub <noreply@github.com>2022-10-15 07:35:18 +0000
commitaf144ebdc70ef6f006bebd47af7a8d3180665538 (patch)
treec3ef9ef64f9959f2820a8083420f4f9b7486d636 /launch.py
parente21f01f64504bc651da6e85216474bbd35ee010d (diff)
parent6a4e84671016d38c10a55fedcdf09321dba737ae (diff)
downloadstable-diffusion-webui-gfx803-af144ebdc70ef6f006bebd47af7a8d3180665538.tar.gz
stable-diffusion-webui-gfx803-af144ebdc70ef6f006bebd47af7a8d3180665538.tar.bz2
stable-diffusion-webui-gfx803-af144ebdc70ef6f006bebd47af7a8d3180665538.zip
Merge branch 'master' into ckpt-cache
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/launch.py b/launch.py
index 16627a03..537670a3 100644
--- a/launch.py
+++ b/launch.py
@@ -9,6 +9,7 @@ import platform
dir_repos = "repositories"
python = sys.executable
git = os.environ.get('GIT', "git")
+index_url = os.environ.get('INDEX_URL', "")
def extract_arg(args, name):
@@ -57,7 +58,8 @@ def run_python(code, desc=None, errdesc=None):
def run_pip(args, desc=None):
- return run(f'"{python}" -m pip {args} --prefer-binary', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
+ index_url_line = f' --index-url {index_url}' if index_url != '' else ''
+ return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
def check_run_python(code):
@@ -76,7 +78,7 @@ def git_clone(url, dir, name, commithash=None):
return
run(f'"{git}" -C {dir} fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}")
- run(f'"{git}" -C {dir} checkout {commithash}', f"Checking out commint for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}")
+ run(f'"{git}" -C {dir} checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}")
return
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")