Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skip-install bug (see #8935) #9330

Merged
merged 2 commits into from
Apr 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
git = os.environ.get('GIT', "git")
index_url = os.environ.get('INDEX_URL', "")
stored_commit_hash = None
skip_install = False
dir_repos = "repositories"

if 'GRADIO_ANALYTICS_ENABLED' not in os.environ:
Expand Down Expand Up @@ -122,7 +121,7 @@ def run_python(code, desc=None, errdesc=None):


def run_pip(args, desc=None):
if skip_install:
if "--skip-install" in sys.argv:
return

index_url_line = f' --index-url {index_url}' if index_url != '' else ''
Expand Down Expand Up @@ -223,8 +222,6 @@ def run_extensions_installers(settings_file):


def prepare_environment():
global skip_install

torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")

Expand Down