This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch 2.5.1-tcpc-deployment
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/2.5.1-tcpc-deployment by this
push:
new c3dc501 [DATALAB-2698]: fixed install_venv_pip_pkg function usage
c3dc501 is described below
commit c3dc5019214271efeae62c50907a582a3227b97b
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 a6c9fe4..aae4060 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]