Skip to content

Commit

Permalink
Merge pull request #110 from ubc-cirrus-lab/setup
Browse files Browse the repository at this point in the history
fixed issues with the setup script
  • Loading branch information
GhazalSdn authored Oct 16, 2023
2 parents 4e7d1ee + 09bcf7f commit 2ab2478
Showing 1 changed file with 89 additions and 17 deletions.
106 changes: 89 additions & 17 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,58 @@ if command -v julia &> /dev/null
then
julia setupJulia.jl
else
echo "Error: Please install Julia and then rerun this script."
exit 1
fi
pip3 install -r ./requirements.txt
echo "Error: Julia is not installed on your system."
echo "Do you want to install Julia? (y/n)"
read installJulia
if [ $installJulia == "y" ]
then
if [ "$(uname)" == "Linux" ] && [ "$(uname -m)" == "x86_64" ]
then
echo "Downloading Julia..."
wget https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.3-linux-x86_64.tar.gz
echo "Extracting Julia..."
tar -xvzf julia-1.9.3-linux-x86_64.tar.gz
echo "Installing Julia..."
sudo cp -r julia-1.9.3 /opt/
sudo ln -s /opt/julia-1.9.3/bin/julia /usr/local/bin/julia
echo "Julia has been installed."
elif [ "$(uname)" == "Linux" ] && [ "$(uname -m)" == "aarch64" ]
then
echo "Downloading Julia..."
wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.9/julia-1.9.3-linux-aarch64.tar.gz
echo "Extracting Julia..."
tar -xvzf julia-1.9.3-linux-aarch64.tar.gz
echo "Installing Julia..."
sudo cp -r julia-1.9.3 /opt/
sudo ln -s /opt/julia-1.9.3/bin/julia /usr/local/bin/julia
echo "Julia has been installed."
else
echo "Please download Julia from https://julialang.org/downloads/, install it, and then re-run this script."
exit 1
fi
julia setupJulia.jl
else
echo "Please install Julia and re-run this script."
exit 1
fi
fi

if command -v pip &> /dev/null
then
echo "pip is installed"
else
echo "pip is not installed"
echo "Do you want to install pip? (y/n)"
read installPip
if [ $installPip == "y" ]
then
sudo apt install -y python3-pip
else
echo "Please install pip and re-run this script."
exit 1
fi
fi
python3 -m pip install -r requirements.txt
sudo apt install -y docker.io
sudo apt-get install -y libpstreams-dev
sudo apt-get install build-essential
Expand All @@ -17,32 +65,56 @@ arr=("DNAVisualizationWorkflow" "ImageProcessingWorkflow" "RegressionTuningWorkf
cd ./scheduler/data
for dirname in "${arr[@]}"
do
mkdir "$dirname"
if [ -d "$dirname" ]
then
echo "Directory $dirname exists."
else
mkdir "$dirname"
fi
done
cd ../
mkdir logs
if [ -d "logs" ]
then
echo "Directory logs exists for the scheduler."
else
mkdir logs
fi
cd ../
cd ./log-parser/get-workflow-logs/data
for dirname in "${arr[@]}"
do
mkdir "$dirname"
if [ -d "$dirname" ]
then
echo "Directory $dirname exists."
else
mkdir "$dirname"
fi
done
cd ../
mkdir logs
if [ -d "logs" ]
then
echo "Directory logs exists for the log collector."
else
mkdir logs
fi
cd ../../
cd ./host-agents/execution-agent
mkdir logs
mkdir data
cd ../../
if [ $leaderFailure -eq 1 ]
if [ -d "logs" ]
then
cd ./log-parser/get-workflow-logs
if command -v python &> /dev/null
echo "Directory logs exists for the host agents."
else
mkdir logs
fi
if [ -d "data" ]
then
python getNewDatastoreLogs.py
elif command -v python3 &> /dev/null
echo "Directory data exists for the host agents."
else
mkdir data
fi
cd ../../
if [ $leaderFailure -eq 1 ]
then
cd ./log-parser/get-workflow-logs
python3 getNewDatastoreLogs.py
fi
fi
echo "Please exit your current session and relogin"

0 comments on commit 2ab2478

Please sign in to comment.