Skip to content

Commit 83c409a

Browse files
CLI to install aqua extenstion in Jupyterlab (#1203)
2 parents f6555bd + f0afe3f commit 83c409a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ads/aqua/cli.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,18 @@ def _validate_value(flag, value):
9494
"If you intend to chain a function call to the result, please separate the "
9595
"flag and the subsequent function call with separator `-`."
9696
)
97+
98+
@staticmethod
99+
def install():
100+
"""Install ADS Aqua Extension from wheel file. Set enviroment variable `AQUA_EXTENSTION_PATH` to change the wheel file path.
101+
102+
Return
103+
------
104+
int:
105+
Installatation status.
106+
"""
107+
import subprocess
108+
109+
wheel_file_path = os.environ.get("AQUA_EXTENSTION_PATH", "/ads/extension/adsjupyterlab_aqua_extension*.whl")
110+
status = subprocess.run(f"pip install {wheel_file_path}",shell=True)
111+
return status.check_returncode

0 commit comments

Comments
 (0)