02 - Hydra cluster setup
First time setup
We have submitted a request to the Hydra team for installation of a Nextflow module. But for now, you will need to install your own copy of Nextflow on the cluster. Login to Hydra and run the following commands.
Note
If you are working on Hydra via the RStudio Server node, you can run these commands in the terminal window, located in the bottom left panel.
# Nextflow installation instructions
# from https://www.nextflow.io/docs/latest/install.html
cd ~
# load Java module, needed by Nextflow
module load tools/java/21.0.2
# install Nextflow
curl -s https://get.nextflow.io | bash
# make Nextflow executable
chmod +x nextflow There will now be an executable nextflow file in your home directory. You should move it to a location that is in your PATH. For example:
# create bin directory, if needed
mkdir ~/bin
# move nextflow to bin directory
mv ~/nextflow ~/bin/nextflow
# add bin directory to PATH, in case it's not already there
echo 'export PATH="${HOME}/bin:${PATH}"' >> ~/.bashrc
# specify Nextflow version to avoid a bug in latest release
echo 'export NXF_VER=25.04.3' >> ~/.bashrc
# reload your bash configuration file
source ~/.bashrcThis should allow you to run nextflow from anywhere on the cluster.
Note
You must load the Hydra Java module (module load tools/java/21.0.2) whenever you wish to use Nextflow from the command line or in a job script.