mirror of
https://github.com/Hopiu/llm.git
synced 2026-03-16 20:50:25 +00:00
llm install --pre option, closes #1060
This commit is contained in:
parent
f879b816e4
commit
a3414ed15d
2 changed files with 9 additions and 1 deletions
|
|
@ -829,6 +829,7 @@ Options:
|
|||
--force-reinstall Reinstall all packages even if they are already up-to-
|
||||
date
|
||||
--no-cache-dir Disable the cache
|
||||
--pre Include pre-release and development versions
|
||||
--help Show this message and exit.
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -2657,7 +2657,12 @@ def display_truncated(text):
|
|||
is_flag=True,
|
||||
help="Disable the cache",
|
||||
)
|
||||
def install(packages, upgrade, editable, force_reinstall, no_cache_dir):
|
||||
@click.option(
|
||||
"--pre",
|
||||
is_flag=True,
|
||||
help="Include pre-release and development versions",
|
||||
)
|
||||
def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre):
|
||||
"""Install packages from PyPI into the same environment as LLM"""
|
||||
args = ["pip", "install"]
|
||||
if upgrade:
|
||||
|
|
@ -2668,6 +2673,8 @@ def install(packages, upgrade, editable, force_reinstall, no_cache_dir):
|
|||
args += ["--force-reinstall"]
|
||||
if no_cache_dir:
|
||||
args += ["--no-cache-dir"]
|
||||
if pre:
|
||||
args += ["--pre"]
|
||||
args += list(packages)
|
||||
sys.argv = args
|
||||
run_module("pip", run_name="__main__")
|
||||
|
|
|
|||
Loading…
Reference in a new issue