Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/CyberBattleSim
Path: blob/main/init.sh
597 views
1
#!/bin/bash
2
3
set -ex
4
5
# Copyright (c) Microsoft Corporation.
6
# Licensed under the MIT License.
7
8
pushd "$(dirname "$0")"
9
10
conda info --envs
11
12
eval "$(conda shell.bash hook)"
13
14
if conda info --envs | grep -q cybersim; then
15
echo "env already exists";
16
else
17
conda env create -f env.yml;
18
fi
19
20
conda activate cybersim
21
22
python --version
23
24
if [ ""$GITHUB_ACTION"" == "" ] && [ -d ".git" ]; then
25
echo 'running under a git enlistment -> configure pre-commit checks on every `git push` to run pyright and co'
26
pre-commit install -t pre-push
27
fi
28
29
./createstubs.sh
30
31
popd
32
33