diff options
author | MalumaDev <piano.lu92@gmail.com> | 2022-10-15 14:20:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 14:20:17 +0000 |
commit | 7b7561f6e4be3b591d845f14743bac2069e6428e (patch) | |
tree | f7ef27ffad7017c0d3cbd9b7a899c4308339885d /launch.py | |
parent | 37d7ffb415cd8c69b3c0bb5f61844dde0b169f78 (diff) | |
parent | d3ffc962dd1d5c8d0ed763a9d05832c153ff15ea (diff) | |
download | stable-diffusion-webui-gfx803-7b7561f6e4be3b591d845f14743bac2069e6428e.tar.gz stable-diffusion-webui-gfx803-7b7561f6e4be3b591d845f14743bac2069e6428e.tar.bz2 stable-diffusion-webui-gfx803-7b7561f6e4be3b591d845f14743bac2069e6428e.zip |
Merge branch 'master' into test_resolve_conflicts
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}")
|