-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlinux_run.sh
More file actions
executable file
·29 lines (23 loc) · 909 Bytes
/
linux_run.sh
File metadata and controls
executable file
·29 lines (23 loc) · 909 Bytes
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
#!/bin/bash
#Install miniconda if it isn't there already
if [ ! -d ./miniconda/ ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ./miniconda.sh
bash ./miniconda.sh -b -p $PWD/miniconda
fi
#Add miniconda to the path
export PATH="$PWD/miniconda/bin:$PATH"
source $PWD/miniconda/bin/activate
#Create conda environment if it doesn't already exist
environment_name=testing123
if conda env list | grep -q $environment_name; then
#The environment already exists
:
else
#The environment doesn't exist so we create it
conda create -n $environment_name -y python=3.6 mkl numpy jupyter matplotlib
fi
#activate the Python environment
source activate $environment_name
source_notebook=./MatrixMatrixBenchmark.ipynb
result_notebook=$PWD/result.ipynb
jupyter nbconvert --ExecutePreprocessor.timeout=360000 --to notebook --execute $source_notebook --output $result_notebook