Skip to content

Instantly share code, notes, and snippets.

@julianpistorius
Last active August 30, 2019 20:32
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 julianpistorius/6df65bea99b65341b9b88053dd2fc125 to your computer and use it in GitHub Desktop.
Save julianpistorius/6df65bea99b65341b9b88053dd2fc125 to your computer and use it in GitHub Desktop.
Dockerfile to build pylibseq
FROM opensciencegrid/osgvo-ubuntu-18.04:latest
#maintainer "Ariella Gladstein <aglad@med.unc.edu>"
#organization "University of North Carolina at Chapel Hill"
#department "Genetics"
#date "30 Auguest 2019"
#application "pylibseq, for calculating population genetic statistics on genotype data"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
libgsl0-dev \
python3 \
python3-dev \
python3-pip \
python3.6-venv \
ipython3 \
python3-numpy \
sqlite3 \
vim \
curl \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 https://github.com/molpopgen/pylibseq.git \
&& cd pylibseq \
&& git submodule update --init --recursive \
&& git submodule status --recursive
WORKDIR /pylibseq
RUN pip3 install setuptools wheel
RUN pip3 install --user -r requirements.txt
RUN pip3 install --user cppimport twine msprime
WORKDIR /
RUN curl -L https://github.com/pybind/pybind11/archive/v2.2.4.tar.gz > pybind11-2.2.4.tar.gz \
&& tar xzf pybind11-2.2.4.tar.gz
WORKDIR /pybind11-2.2.4
RUN cmake . -DPYBIND11_PYTHON_VERSION=3.6.8 -DPYBIND11_TEST=0 \
&& make install
ENV PATH="/root/.local/bin:${PATH}"
WORKDIR /pylibseq
RUN python3 setup.py build_ext --inplace
#RUN python3 -m unittest discover tests
RUN python3 setup.py sdist \
&& python3 setup.py check \
&& python3 -m twine check dist/*.tar.gz
RUN python3 -m venv venv \
&& ./venv/bin/pip3 install --upgrade setuptools pip pybind11 \
&& ./venv/bin/pip3 install dist/pylibseq-0.2.3.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment