This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DATALAB-2698 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 3e06945cd320fead4c765574be32cc2b6e47c8a4 Author: leonidfrolov <[email protected]> AuthorDate: Mon Feb 14 18:29:52 2022 +0200 [DATALAB-2698]: fixed install_venv_pip_pkg function usage --- .../src/general/lib/os/debian/notebook_lib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py index 768e6aa..7c094e1 100644 --- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py +++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py @@ -398,11 +398,12 @@ def install_tensor(os_user, cuda_version, cuda_file_name, def ensure_pytorch(os_user, gpu=True): if not exists(datalab.fab.conn, '/home/' + os_user + '/.ensure_dir/pytorch_ensured'): if gpu: - install_venv_pip_pkg('torch==1.10.2+cu113 torchvision==0.11.3+cu113 torchaudio==0.10.2+cu113' - ' -f https://download.pytorch.org/whl/cu113/torch_stable.html') + datalab.fab.conn.install_venv_pip_pkg('torch==1.10.2+cu113 torchvision==0.11.3+cu113 ' + 'torchaudio==0.10.2+cu113 -f ' + 'https://download.pytorch.org/whl/cu113/torch_stable.html') else: - datalab.fab.conn.sudo('pip3 install torch==1.10.2+cpu torchvision==0.11.3+cpu torchaudio==0.10.2+cpu -f ' - 'https://download.pytorch.org/whl/cpu/torch_stable.html --no-cache-dir') + datalab.fab.conn.install_venv_pip_pkg('torch==1.10.2+cpu torchvision==0.11.3+cpu torchaudio==0.10.2+cpu -f ' + 'https://download.pytorch.org/whl/cpu/torch_stable.html') datalab.fab.conn.sudo('touch /home/' + os_user + '/.ensure_dir/pytorch_ensured') --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
