Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Software setup on CSD3 workshops #46

Open
tavareshugo opened this issue Jun 28, 2024 · 1 comment
Open

Software setup on CSD3 workshops #46

tavareshugo opened this issue Jun 28, 2024 · 1 comment

Comments

@tavareshugo
Copy link
Collaborator

tavareshugo commented Jun 28, 2024

Might be good to have a script for setting things up on a fresh CSD3 account.

Collecting loose commands here.


Script to download data

cd ~/rds/rds-introhpc/
# workshop data
wget -O data.zip "https://www.dropbox.com/scl/fo/x1ery8kni952gz450jt3z/ADbTA_FLJxPejtY30QLf1G4?rlkey=dq2sah0gknmdfx9dp1nvdzd51&dl=1"
# mamba installer
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

Script to setup instances

# backup bashrc
cp ~/.bashrc ~/.bashrc_bkp

# unzip data to hpc-work
unzip ~/rds/rds-introhpc/data.zip -d ~/rds/hpc-work/hpc_workshop

# install mamba
bash ~/rds/rds-introhpc/Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge3
$HOME/miniforge3/bin/mamba init
source ~/.bashrc
conda config --add channels defaults; conda config --add channels bioconda; conda config --add channels conda-forge
conda config --set remote_read_timeout_secs 1000

# set R up
mamba install -y -n base r-argparse==2.2.2

# cache some conda environments
mamba create -y -n scipy scipy==1.12.0 numpy==1.26.4 matplotlib==3.8.3
mamba create -y -n mapping bowtie2==2.5.3
@tavareshugo
Copy link
Collaborator Author

tavareshugo commented Jun 28, 2024

(edit: at the moment this approach doesn't work because miniforge hard-codes the path to the python executable upon installation, so moving things around is not a good idea)

Alternative with no need to install mamba from scratch.

Set things up in shared space (this script is semi-broken don't copy/paste the whole thing, run it interactively on a fresh account):

# install mamba in shared space
bash ~/rds/rds-introhpc/Miniforge3-$(uname)-$(uname -m).sh -b -p ~/rds/rds-introhpc/miniforge3

~/rds/rds-introhpc/miniforge3/bin/mamba init
source ~/.bashrc
conda config --add channels defaults; conda config --add channels bioconda; conda config --add channels conda-forge
conda config --set remote_read_timeout_secs 1000

# set R up
mamba install -y -n base r-argparse==2.2.2

# cache some conda environments
mamba install -y -n scipy scipy==1.12.0 numpy==1.26.4 matplotlib==3.8.3
mamba install -y -n mapping bowtie2==2.5.3

On a new user, we can run this:

# backup bashrc
cp ~/.bashrc ~/.bashrc_bkp

# unzip data to hpc-work
unzip ~/rds/rds-introhpc/data.zip -d ~/rds/hpc-work/hpc_workshop

# copy miniforge into the users' directory
cp -r ~/rds/rds-introhpc/miniforge3 ~/

# initialise
$HOME/miniforge3/bin/mamba init

# add default channels
cat << 'EOF' > ~/.condarc
channels:
  - conda-forge
  - bioconda
  - defaults
remote_read_timeout_secs: 1000.0
EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant