This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DATALAB-2631 in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit abdfdf127e60294298e5d05a54f9d4565b6787f0 Author: leonidfrolov <[email protected]> AuthorDate: Tue Jan 18 11:57:07 2022 +0200 [DATALAB-2631]: fixed activate command not found --- infrastructure-provisioning/src/base/scripts/install_user_key.py | 1 + infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/infrastructure-provisioning/src/base/scripts/install_user_key.py b/infrastructure-provisioning/src/base/scripts/install_user_key.py index 2e68abd..8059156 100644 --- a/infrastructure-provisioning/src/base/scripts/install_user_key.py +++ b/infrastructure-provisioning/src/base/scripts/install_user_key.py @@ -51,6 +51,7 @@ def copy_key(config): else: key = config.get('user_key') conn.sudo('echo "{0}" >> /home/{1}/.ssh/authorized_keys'.format(key, args.user)) + conn.sudo('chmod 600 /home/{0}/.ssh/authorized_keys'.format(args.user)) except: print('No user key') diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py index dca9c9b..e76f770 100644 --- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py +++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py @@ -1560,7 +1560,7 @@ def installing_python(region, bucket, user_name, cluster_name, application='', p subprocess.run('sudo echo "[global]" >> /etc/pip.conf', shell=True, check=True) subprocess.run('sudo echo "timeout = 600" >> /etc/pip.conf', shell=True, check=True) subprocess.run('sudo -i virtualenv /opt/python/python' + python_version, shell=True, check=True) - venv_command = '/bin/bash /opt/python/python' + python_version + '/bin/activate' + venv_command = '/bin/bash source /opt/python/python' + python_version + '/bin/activate' pip_command = '/opt/python/python' + python_version + '/bin/pip' + python_version[:3] if region == 'cn-north-1': try: @@ -1592,7 +1592,7 @@ def installing_python(region, bucket, user_name, cluster_name, application='', p subprocess.run('sudo rm -rf /opt/python/python{}/'.format(python_version), shell=True, check=True) sys.exit(1) else: - print(subprocess.run(venv_command + ' && sudo -i ' + pip_command + ' install -U pip==9.0.3', shell=True, check=True)) + subprocess.run(venv_command + ' && sudo -i ' + pip_command + ' install -U pip==9.0.3', shell=True, check=True) subprocess.run(venv_command + ' && sudo -i ' + pip_command + ' install pyzmq==17.0.0', shell=True, check=True) subprocess.run(venv_command + ' && sudo -i ' + pip_command + ' install ipython ipykernel --no-cache-dir', shell=True, check=True) subprocess.run(venv_command + ' && sudo -i ' + pip_command + ' install NumPy=={}'.format(numpy_version), shell=True, check=True) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
