setup_scripts / aws_software_setup.sh
kiriyamaX's picture
Update aws_software_setup.sh
dd05c8c verified
#!/bin/bash
# update
sudo apt-get update
# check and install aws cli if not exists
if ! command -v aws &> /dev/null
then
echo "Installing AWS CLI..."
cd ~/
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo apt install unzip && unzip awscliv2.zip
sudo ./aws/install
rm awscliv2.zip
else
echo "AWS CLI is already installed."
fi
# check and install btop if not exists
if ! command -v btop &> /dev/null
then
echo "Installing btop..."
sudo snap install btop
else
echo "btop is already installed."
fi
# Check if git-lfs is installed
if ! command -v git-lfs &> /dev/null
then
echo "Installing git-lfs..."
sudo apt-get update
sudo apt-get install git-lfs
else
echo "git-lfs is already installed."
fi
# check and install miniconda3 if not exists
if [[ ! $(which python) == *miniconda* ]]
then
echo "Installing Miniconda3..."
cd ~/ && mkdir -p miniconda3 && wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.5.2-0-Linux-x86_64.sh -O ./miniconda3/miniconda.sh --no-check-certificate && bash ./miniconda3/miniconda.sh -b -u -p ./miniconda3 && rm ./miniconda3/miniconda.sh && ./miniconda3/bin/conda init bash && source ~/.bashrc && python -m pip install unibox ipykernel jupyter && python -m ipykernel install --user --name=conda310
else
echo "Miniconda3 is already installed."
fi