-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall_dependencies.py
More file actions
37 lines (32 loc) · 2.13 KB
/
install_dependencies.py
File metadata and controls
37 lines (32 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'''
This code installs various dependencies and the Github CLI
'''
import subprocess
def install_dependencies():
subprocess.run(['pip3', 'install', '--upgrade', 'pip'])
subprocess.run(['pip', 'install', 'jsonschema'])
subprocess.run(['pip', 'install', 'yaml'])
# subprocess.run(['pip3', 'install', 'yq'])
subprocess.run(['pip3', 'install', 'wheel'])
# subprocess.run(['pip3', 'install', 'azure-cli', '--upgrade'])
subprocess.run(['pip3', 'install', '--upgrade', 'azure-ai-ml'] )
subprocess.run(['pip3', 'install', 'mltable'])
# subprocess.run(['pip3', 'install', 'requests'])
subprocess.run(['pip3', 'install', 'pandas'])
subprocess.run(['pip3', 'install', 'azureml-dataprep[pandas]'])
subprocess.run(['pip3', 'install', 'ruamel.yaml'])
# if subprocess.run(['which', 'bicep']).returncode != 0:
# subprocess.run(['curl', '-Lo', '/usr/local/bin/bicep', 'https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64'])
# subprocess.run(['chmod', '+x', '/usr/local/bin/bicep'])
# if subprocess.run(['which', 'curl']).returncode != 0:
# subprocess.run(['sudo', 'apt', 'update'])
# subprocess.run(['sudo', 'apt', 'install', 'curl', '-y'])
# subprocess.run(['curl', '-fsSL', 'https://cli.github.com/packages/githubcli-archive-keyring.gpg'], stdout=subprocess.PIPE)
# curl_process = subprocess.run(['curl', '-fsSL', 'https://cli.github.com/packages/githubcli-archive-keyring.gpg'], stdout=subprocess.PIPE)
# subprocess.run(['sudo', 'dd', 'of=/usr/share/keyrings/githubcli-archive-keyring.gpg'], input=curl_process.stdout)
# subprocess.run(['sudo', 'chmod', 'go+r', '/usr/share/keyrings/githubcli-archive-keyring.gpg'])
# subprocess.run(['echo', f"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main"], stdout=subprocess.PIPE, shell=True)
# subprocess.run(['sudo', 'tee', '/etc/apt/sources.list.d/github-cli.list'], stdin=subprocess.PIPE)
# subprocess.run(['sudo', 'apt', 'update'])
# subprocess.run(['sudo', 'apt', 'install', 'gh', '-y'])
install_dependencies()