Skip to content

Instantly share code, notes, and snippets.

@mlin
Last active July 24, 2019 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlin/5ea4ca5d2a2a198e5659 to your computer and use it in GitHub Desktop.
Save mlin/5ea4ca5d2a2a198e5659 to your computer and use it in GitHub Desktop.
PhyloCSF Dockerfile (OpenBLAS)
# Dockerfile for PhyloCSF using OpenBLAS to take advantage of vector
# instructions (AVX). On supported processors, this can significantly speed up
# PhyloCSF (25-50%) compared to the default GSL BLAS.
# Example usage:
# docker build -t mlin:PhyloCSF https://gist.githubusercontent.com/mlin/5ea4ca5d2a2a198e5659/raw/Dockerfile
# docker run -v /path/to/host/data:/data mlin:PhyloCSF 29mammals /data/input.fa
# PhyloCSF homepage: https://github.com/mlin/PhyloCSF/wiki
FROM ubuntu:trusty
MAINTAINER Mike Lin <mlin@mlin.net>
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-suggests --no-install-recommends ca-certificates software-properties-common time git build-essential gfortran
RUN git clone --depth 1 --branch master https://github.com/xianyi/OpenBLAS.git
RUN make -C OpenBLAS -j `nproc` NO_LAPACK=1 NO_LAPACKE=1 USE_THREAD=0
RUN make -C OpenBLAS install PREFIX=/usr/local
RUN add-apt-repository ppa:avsm/ppa
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-suggests --no-install-recommends -y ocaml camlp4 camlp4-extra opam libgsl0-dev m4 pkg-config
RUN opam init
ENV GSL_CBLAS_LIB -lopenblas
RUN opam install -y batteries gsl ocaml+twt forkwork ounit should
RUN git clone git://github.com/mlin/PhyloCSF.git
WORKDIR /PhyloCSF
RUN eval $(opam config env) && make FORKWORK=1 && make -C src FORKWORK=1 testexe
ENV TIME \n \t%E real,\t%U user,\t%S sys
RUN ["/bin/bash","-c","cd src && time ./test.native"]
ENTRYPOINT ["/PhyloCSF/PhyloCSF"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment