Skip to content

Rfam/rfam-family-pipeline

Repository files navigation

Running the Rfam family-building-pipeline locally using Docker

  1. Download and install docker for your favourite OS
  2. Clone the rfam-family-pipeline repository from GitHub:
git clone https://github.com/Rfam/rfam-family-pipeline.git
  1. Go to the rfam-family-pipeline directory and build a docker image using the Dockerfile:
cd /path/to/rfam-family-pipeline
docker image build -t rfam-local .
  1. When you have the image built and start a new container by calling:
docker run -i -t rfam-local:latest /bin/bash
  1. In the container, create a working directory and start building families

⚠️ Your work will be lost after killing the container. To prevent that from happening do one of the following:

  1. Copy all your hard work from within the container to your local machine:
docker container ls # use this to find the container id
docker container cp CONTAINER_ID:/workdir/within/container /path/to/local/dir
  1. Mount a dedicated working directory on your local machine to the one in the docker container:
docker run -i -t rfam-local:latest -v /path/to/local/workdir:/workdir /bin/bash

Note: Update Rfam/Conf/rfam.conf to provide a local location of the sequence database and Rfam/Conf/rfam_local.conf to establish a connection with the public MySQL database.

For Developers:

To easily test any changes your make to the code, mount your local directory to the rfam-family-pipeline directory in the docker container.

docker run -i -t rfam-local:latest -v /path/to/local/rfam-family-pipeline:/Rfam/rfam-family-pipeline bash

❗ You can also mount a directory on your machine to the /workdir inside the container to have any testing output generated directly on your local machine:

docker run -i -t rfam-local:latest -v /path/to/local/rfam-family-pipeline:/Rfam/rfam-family-pipeline -v /path/to/local/dir:/workdir bash