Skip to the content.

Installation scripts for participants

ipyrad install script

Contents of /home/jovyan/work/scripts/install_ipyrad.sh

#!/bin/bash

echo "**************************"
echo "Updating conda environment"
echo "**************************"

bash /home/jovyan/work/Miniconda3-latest-Linux-x86_64.sh -b -u -p /opt/conda

echo "***************************"
echo "Creating ipyrad environment"
echo "***************************"

conda create -n ipyrad -y
source /opt/conda/bin/activate
conda activate ipyrad

conda env list

echo "*****************"
echo "Installing ipyrad"
echo "*****************"

conda install -c conda-forge -c bioconda numpy=1.26.4 ipyrad fastqc scikit-learn toytree raxml -y

echo "*************************"
echo "Installing jupyter kernel"
echo "*************************"

python -m ipykernel install --user --name=ipyrad

echo "conda activate ipyrad" >> ~/.bashrc

FEEMS install script

Contents of /home/jovyan/work/scripts/install_feems.sh

#!/bin/bash

echo "**************************"
echo "Creating FEEMS environment"
echo "**************************"
# Create/activate a new environment and install all the necessary deps for feems
conda create -n feems python=3.9 -y
source /opt/conda/bin/activate
conda activate feems

echo "*****************************"
echo "Installing FEEMS dependencies"
echo "*****************************"
conda install -c conda-forge -c bioconda feems notebook h5py matplotlib=3.5.2 shapely=1.8 -y

echo "****************"
echo "Installing FEEMS"
echo "****************"
# Copy the feems src code and pip install it with the changes
mkdir /home/jovyan/src
cp -Rf /home/jovyan/work/feems /home/jovyan/src
pip install -e /home/jovyan/src/feems

# Install the notebook kernel
python -m ipykernel install --user --name=feems

Configuration of the RADCamp Jupyterhub Server

Launching the jhub server

sudo /home/deren/miniconda3/envs/jhub/bin/jupyterhub --config /etc/jupyterhub/jupyterhub_config.py

Resetting a user container

Docker containers live here: /var/lib/docker/containers

Jupyter hub uses docker images under the hood and it appears that when a user logs in for the first time it spins up a container and applies layers to it that ‘stick’ across logins. Specifically, the read_only_volumes don’t get updated after first container creation (it appears). If you make changes to the mounted volumes that you want to see applied to a user that has already logged in you have to delete the user and the container and start them from scratch. Do it like this:

Emergency backup plan TBD

Setup for ipyrad

THIS IS THE BY-HAND INSTRUCTIONS THAT I REMOVED WHEN I WROTE THE INSTALL SCRIPT.

ipyrad uses conda, which is a package manager for python. We downloaded the miniconda installer and saved it in the work directory, so you can run the installer from there.

IMPORTANT: The cloud server has conda installed already but we need to deactivate that version before we can install the new version.
DO NOT SKIP THIS STEP!

conda deactivate
bash ./work/Miniconda3-latest-Linux-x86_64.sh

During the miniconda installation follow these directions:

Your prompt should now look like this:

(base) jovyan@493222dbc32d:~$

Now you can install ipyrad (and a few of the other necessary packages we’ll be using) with conda like this (it will take 1-2 minutes). We recommend to copy/paste this line into the terminal to avoid typos:

conda install -c conda-forge -c bioconda numpy=1.26.4 ipyrad fastqc scikit-learn toytree raxml -y

Notebook kernel installation - IMPORTANT: This is the last setup command that is necessary for accessing the conda environment with these packages inside jupyter notebooks (which we will use extensively later in the course).

python -m ipykernel install --user --name=ipyrad

Setup for FEEMS

FEEMS is a huge pain to get working so I had to do a bunch of back-office black magic to make the install not a nightmare at runtime.

Setting disks on pinky/brain to automount