Skip to content

Dockerfile #7

@lvclark

Description

@lvclark

I built a containerized version of EagleImp this week and just wanted to share it in case it was helpful to anyone else. If you would like me to put in a pull request let me know. I saw that there was an EagleImp container on DockerHub, but it was a couple years old and it looks like there have been many updates to the source code since then.

The Dockerfile:

FROM ubuntu:22.04

RUN apt-get update && apt-get upgrade -y

# Packages for EagleImp
RUN apt-get install -y build-essential

RUN apt-get install -y zlib1g-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libtbb2-dev cmake

RUN apt-get install -y gawk

# Packages for BCFtools
RUN apt-get install -y autoconf automake make gcc perl libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev libdeflate-dev

RUN apt-get install -y libgsl0-dev

# Source code downloaded from GitHub
COPY htslib /opt/htslib

COPY bcftools /opt/bcftools

COPY eagleimp /opt/eagleimp

# Build BCFtools
WORKDIR /opt/bcftools

RUN autoheader && autoconf && ./configure --enable-libgsl

RUN make

# Build HTSlib
WORKDIR /opt/htslib

RUN autoreconf -i

RUN ./configure

RUN make

RUN make install

# Build EagleImp
WORKDIR /opt/eagleimp

RUN cmake -DCMAKE_BUILD_TYPE=Release -S src -B build

WORKDIR /opt/eagleimp/build

RUN make -j

# Update PATH
ENV PATH="${PATH}:/opt/htslib:/opt/bcftools:/opt/eagleimp/build"

ENV BCFTOOLS_PLUGINS=/opt/bcftools/plugins

# Set starting directory
WORKDIR /opt

For it to build, the eagleimp, bcftools, and htslib repositories should be cloned from GitHub into the same directory as the Dockerfile.

After building the Docker image, I was able to successfully convert it to an Apptainer image, which I was able to use on my organization's HPC.

If you want to use the launch_eagleimp script, you should download a writeable copy of it from GitHub, and do chmod 775 launch_eagleimp. Edit launch_eagleimp to configure it. You can set REPOPATH=/opt/eagleimp and leave the EAGLEIMP, BCFTOOLS, and GAWK variables as they are. All other path variables, including TMPDIR, should point to paths on your local system (outside of the container, particularly if using Apptainer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions