Skip to content

Commit

Permalink
feat: Bash script for Conda and env installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrover112 committed Aug 14, 2021
1 parent 5768ef1 commit 5f8d9ac
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions setup/setup.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
#!/bin/sh
echo "Setting up conda PyPy environment...."
source ~/miniconda3/etc/profile.d/conda.sh
echo "Creating the environment.."
conda env create -f config.yml

function dots(){
for i in {1..5};
do
echo -n "."
sleep 0.1
done
echo ""
}
echo -n "Checking Conda installation";dots;
function check_conda_install()
{
if $(which conda)> /dev/null;
then
echo -n "Conda found. Skipping installation.";dots;

else

echo "Conda not found. Installing.."
echo "Updating and Upgrading Linux packages...."
sudo apt update --yes
sudo apt upgrade --yes
#Get Miniconda and make it the main Python interpreter
#Modified from Source: https://gist.github.com/arose13/fcc1d2d5ad67503ba9842ea64f6bac35 :/
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
source ~/miniconda.sh -b -p ~/miniconda
rm ~/miniconda.sh

export PATH=~/miniconda/bin:$PATH
echo -n "Conda installed and PATH updated.";dots #Github Copilot wrote this line
fi
}
check_conda_install
sleep 0.4
echo -n "Setting up conda PyPy environment";dots;
#source ~/miniconda3/etc/profile.d/conda.sh
echo -n "Creating the environment";dots;
#conda env create -f config.yml
sleep 0.5
echo "Setup done..."
echo "Activating environment....."
echo -n "Setup done";dots;
echo -n "Activating environment";dots;
sleep 0.5
conda activate config
#conda activate config
echo "Done :D"


0 comments on commit 5f8d9ac

Please sign in to comment.