Skip to content

Commit

Permalink
Update setup_env.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
d-laub authored Sep 10, 2024
1 parent ab89021 commit 1e3c575
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions setup_env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
#!/bin/bash
#! /bin/bash

conda env create -n bootcamp -f env.yml # runtime: ~13min
~/.conda/envs/bootcamp/bin/python3 -m ipykernel install --user --name=python_bootcamp --display-name="Python 3 (bootcamp)"
Rscript -e 'IRkernel::installspec(name="R_bootcamp", displayname="R (bootcamp)")'
set -eu

if [ ! -e "$HOME/Miniforge3-Linux-x86_64.sh" ]; then
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -P $HOME
fi

if [ ! -e "$HOME/miniforge3" ]; then
bash $HOME/Miniforge3-Linux-x86_64.sh -b
fi

export PATH="$HOME/miniforge3/bin:$PATH"

mamba env create -f env.yml -y
mamba run -n bootcamp ipython kernel install --user --name=python_bootcamp --display-name="Python 3 (bootcamp)"
mamba run -n bootcamp Rscript -e 'IRkernel::installspec(name="R_bootcamp", displayname="R (bootcamp)")'

mamba init
source ~/.bashrc

touch ~/.bash_profile
cat >> ~/.bash_profile << EOF
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
EOF

rm ~/Miniforge3-Linux-x86_64.sh

0 comments on commit 1e3c575

Please sign in to comment.