-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Bash script for Conda and env installation
- Loading branch information
1 parent
5768ef1
commit 5f8d9ac
Showing
1 changed file
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
||
|