Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Azure
GitHub Repository: Azure/Azure-Sentinel-Notebooks
Path: blob/master/tutorials-and-examples/how-tos/aml-compute-setup.sh
3253 views
1
#!/bin/bash
2
3
# This script installs msticpy in AML Compute
4
LOG=/tmp/aml-setup-msticpy.log
5
echo ======================================== 2>&1 | tee -a $LOG
6
echo Started $(date) 2>&1 | tee -a $LOG
7
echo Installing libs 2>&1 | tee -a $LOG
8
sudo apt-get --yes -q install libgirepository1.0-dev 2>&1 | tee -a $LOG
9
sudo apt-get --yes -q install gir1.2-secret-1 2>&1 | tee -a $LOG
10
11
ENVIRONMENT=azureml_py38
12
sudo -u azureuser -i <<EOF
13
LOG=/tmp/aml-setup-msticpy.log
14
ENVIRONMENT=azureml_py38
15
echo ---------------------------------------- 2>&1 | tee -a $LOG
16
conda activate "$ENVIRONMENT"
17
echo ---------------------------------------- 2>&1 | tee -a $LOG
18
echo Updating $ENVIRONMENT 2>&1 | tee -a $LOG
19
conda install --yes --quiet pip wheel 2>&1 | tee -a $LOG
20
echo Removing enum34 and installing pygobject 2>&1 | tee -a $LOG
21
22
pip uninstall --yes enum34 2>&1 | tee -a $LOG
23
conda install --yes --quiet -c conda-forge pygobject 2>&1 | tee -a $LOG
24
25
echo Installing msticpy in $ENVIRONMENT 2>&1 | tee -a $LOG
26
pip install msticpy[azuresentinel] 2>&1 | tee -a $LOG
27
conda deactivate
28
29
echo Finished updating $ENVIRONMENT 2>&1 | tee -a $LOG
30
EOF
31
32
ENVIRONMENT=azureml_py36
33
sudo -u azureuser -i <<EOF
34
LOG=/tmp/aml-setup-msticpy.log
35
ENVIRONMENT=azureml_py36
36
echo ---------------------------------------- 2>&1 | tee -a $LOG
37
echo Updating $ENVIRONMENT 2>&1 | tee -a $LOG
38
echo ---------------------------------------- 2>&1 | tee -a $LOG
39
conda activate "$ENVIRONMENT"
40
conda install --yes --quiet pip wheel 2>&1 | tee -a $LOG
41
42
echo Removing enum34 and installing pygobject 2>&1 | tee -a $LOG
43
pip uninstall --yes enum34 2>&1 | tee -a $LOG
44
conda install --yes --quiet -c conda-forge pygobject 2>&1 | tee -a $LOG
45
46
echo Installing msticpy in $ENVIRONMENT 2>&1 | tee -a $LOG
47
pip install msticpy[azuresentinel] 2>&1 | tee -a $LOG
48
49
echo Finished updating $ENVIRONMENT 2>&1 | tee -a $LOG
50
EOF
51
52
echo Completed $(date) 2>&1 | tee -a $LOG
53
echo ======================================== 2>&1 | tee -a $LOG
54