Path: blob/master/tutorials-and-examples/how-tos/aml-compute-setup.sh
3253 views
#!/bin/bash12# This script installs msticpy in AML Compute3LOG=/tmp/aml-setup-msticpy.log4echo ======================================== 2>&1 | tee -a $LOG5echo Started $(date) 2>&1 | tee -a $LOG6echo Installing libs 2>&1 | tee -a $LOG7sudo apt-get --yes -q install libgirepository1.0-dev 2>&1 | tee -a $LOG8sudo apt-get --yes -q install gir1.2-secret-1 2>&1 | tee -a $LOG910ENVIRONMENT=azureml_py3811sudo -u azureuser -i <<EOF12LOG=/tmp/aml-setup-msticpy.log13ENVIRONMENT=azureml_py3814echo ---------------------------------------- 2>&1 | tee -a $LOG15conda activate "$ENVIRONMENT"16echo ---------------------------------------- 2>&1 | tee -a $LOG17echo Updating $ENVIRONMENT 2>&1 | tee -a $LOG18conda install --yes --quiet pip wheel 2>&1 | tee -a $LOG19echo Removing enum34 and installing pygobject 2>&1 | tee -a $LOG2021pip uninstall --yes enum34 2>&1 | tee -a $LOG22conda install --yes --quiet -c conda-forge pygobject 2>&1 | tee -a $LOG2324echo Installing msticpy in $ENVIRONMENT 2>&1 | tee -a $LOG25pip install msticpy[azuresentinel] 2>&1 | tee -a $LOG26conda deactivate2728echo Finished updating $ENVIRONMENT 2>&1 | tee -a $LOG29EOF3031ENVIRONMENT=azureml_py3632sudo -u azureuser -i <<EOF33LOG=/tmp/aml-setup-msticpy.log34ENVIRONMENT=azureml_py3635echo ---------------------------------------- 2>&1 | tee -a $LOG36echo Updating $ENVIRONMENT 2>&1 | tee -a $LOG37echo ---------------------------------------- 2>&1 | tee -a $LOG38conda activate "$ENVIRONMENT"39conda install --yes --quiet pip wheel 2>&1 | tee -a $LOG4041echo Removing enum34 and installing pygobject 2>&1 | tee -a $LOG42pip uninstall --yes enum34 2>&1 | tee -a $LOG43conda install --yes --quiet -c conda-forge pygobject 2>&1 | tee -a $LOG4445echo Installing msticpy in $ENVIRONMENT 2>&1 | tee -a $LOG46pip install msticpy[azuresentinel] 2>&1 | tee -a $LOG4748echo Finished updating $ENVIRONMENT 2>&1 | tee -a $LOG49EOF5051echo Completed $(date) 2>&1 | tee -a $LOG52echo ======================================== 2>&1 | tee -a $LOG5354