diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-15 07:35:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 07:35:18 +0000 |
commit | af144ebdc70ef6f006bebd47af7a8d3180665538 (patch) | |
tree | c3ef9ef64f9959f2820a8083420f4f9b7486d636 /launch.py | |
parent | e21f01f64504bc651da6e85216474bbd35ee010d (diff) | |
parent | 6a4e84671016d38c10a55fedcdf09321dba737ae (diff) | |
download | stable-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.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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}")
|