Skip to content

5. Setup projects with RUMP using AWS EC2

Xinsong Du edited this page May 18, 2020 · 11 revisions

Create AWS account

Create IAM user

Create EC2 instance and connect to it

Please note that Following steps are designed for t2.2xlarge instance with an additional volume /dev/xvdb/. Make sure you add enough space to the volume in order to store RUMP, your own data, and all dependencies. Please also be aware that the use of EC2 will cost you money and you will be billed accordingly the type and the number of instances chosen, and on the storage space utilised. The following steps will cost you about $10.00

Change user to root

$ sudo su

Add /usr/local/bin to $PATH

  1. Open visudo
$ visudo
  1. Find word secure_path, you can use / command to do the search
  2. Append /usr/local/bin to secure_path. The line will be like the following
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

Reboot and reconnect

  1. Type the following
$ reboot
  1. Reconnect to your EC2 instance with ssh
  2. Change to root user
$ sudo su

Install required tools

  • git
$ yum install git
$ ./configure --prefix=/usr/local
$ yum install libarchive-devel
$ VERSION=2.5.2
$ wget https://github.com/singularityware/singularity/releases/download/$VERSION/singularity-$VERSION.tar.gz
$ tar xvf singularity-$VERSION.tar.gz
$ cd singularity-$VERSION
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
  • squashfh-tools
$ yum install squashfs-tools
$ yum install java-1.8.0-openjdk
# switch to Java 8
$ alternatives --config java
$ wget -qO- https://get.nextflow.io | bash
  • move nextflow to $PATH
$ mv nextflow /usr/local/bin/
$ mount /dev/xvdb /mnt
  • Recommend to install under /mnt/apps/ directory, if not exist, run the following command line
$ mkdir -p /mnt/apps/
  • Following steps are designed for RUMP installed under /mnt/apps/, please move to RUMP repository
cd /mnt/apps/RUMP

Create folder work/singularity under /mnt/apps/RUMP/ repo and set permission 777

$ mkdir -p work/singularity && chmod 777 work/singularity

Pull singularity image

$ cd work/singularity/ && singularity pull --name xinsongdu-lemaslab_rump-v1.0.0.img docker://xinsongdu/lemaslab_rump:v1.0.0

Set permission 777 for data folder

$ chmod 777 data

Automount singularity

Add singularity.autoMounts = true to nextflow.config

Upload data

  • Following tools can be used:
  • Store your positive/negative data and positive/negative design files to /mnt/apps/RUMP/data/

Execute Nextflow

Following steps are the same as executing Nextflow on local machine

Tricks

  • Tmux can be used to run RUMP on the background (i.e., program will not end automatically after you close command-line terminal)