Skip to content

Commit e40aed6

Browse files
committed
adding uv
1 parent d7999a5 commit e40aed6

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎modules/launch_utils.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
os.environ['GRADIO_ANALYTICS_ENABLED'] = 'False'
3131

3232

33+
3334
def check_python_version():
3435
is_windows = platform.system() == "Windows"
3536
major = sys.version_info.major
@@ -135,8 +136,11 @@ def run_pip(command, desc=None, live=default_command_live):
135136
return
136137

137138
index_url_line = f' --index-url {index_url}' if index_url != '' else ''
138-
return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
139139

140+
if "ENABLE_UV" not in os.environ:
141+
return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
142+
else:
143+
return run(f'uv pip {command} --prefer-binary{index_url_line} --no-cache-dir', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
140144

141145
def check_run_python(code: str) -> bool:
142146
result = subprocess.run([python, "-c", code], capture_output=True, shell=False)

‎webui-user.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@
5757
#export RAY_ADDRESS='ray://ray-head:10001'
5858
#export RAY_DOCKER="True"
5959
#export RAY_DASHBOARD_PORT=8265
60-
#export RAY_DASHBOARD_HOST="0.0.0.0"
60+
#export RAY_DASHBOARD_HOST="0.0.0.0"
61+
export ENABLE_UV="True"

0 commit comments

Comments
 (0)