Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
103 lines (79 sloc) 4.43 KB
FROM ubuntu-debootstrap
MAINTAINER Artem Tarasov <>
# based on
# Add keys an source to install the latest stable version of R
RUN echo "deb trusty/" > /etc/apt/sources.list.d/r-stable-trusty.list && \
apt-key adv --keyserver --recv-keys E084DAB9
# Add keys an source to install the latest stable version of nginx
RUN echo "deb trusty main" > /etc/apt/sources.list.d/nginx-stable-trusty.list && \
apt-key adv --keyserver --recv-keys C300EE8C
# install the software
RUN apt-get update && \
apt-get install -y apt-utils git python-dev libffi-dev libmysqlclient-dev \
libatlas-base-dev gfortran g++ python-pip libyaml-dev \
mysql-server r-base r-base-dev colordiff ntp ufw wget \
redis-server nginx
# install virtualenv, set default interpreter to bash
RUN pip install virtualenv
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN virtualenv ve27
# fetch the list of Python module dependencies
RUN wget --quiet
# install pp module separately
RUN wget && \
tar xvf pp-1.6.3.tar.gz && \
cd pp-1.6.3 && source ~/ve27/bin/activate && \
python install
# install numpy separately (otherwise installation of scipy fails in the next step)
RUN source ~/ve27/bin/activate && pip install numpy==1.7.0
## install qtlreaper
RUN wget "" && \
mv -v "qtlreaper-1.1.1.tar.gz?" qtlreaper-1.1.1.tar.gz && \
tar xvf qtlreaper-1.1.1.tar.gz && \
mkdir ~/ve27/include/python2.7/Reaper && \
cd qtlreaper-1.1.1 && source ~/ve27/bin/activate && \
python install
## install numarray
RUN wget "" && \
mv -v numarray-1.5.2* numarray-1.5.2.tar.gz && \
tar xvf numarray-1.5.2.tar.gz && \
cd numarray-1.5.2 && source ~/ve27/bin/activate && \
python install
# install the rest of the required modules
RUN source ~/ve27/bin/activate && \
sed -i 's/MySQL-python==1.2.4/MySQL-python==1.2.5/g' requirements.txt && \
pip install -r requirements.txt && \
pip install rpy2
# install supervisor
RUN apt-get install -y supervisor
# download and install / unpack plink (a requirement)
RUN wget && \
unzip -d /home/zas1024
# download and install pyLMM inside the docker image (for development you might want to add it from the localhost on the docker run commandline)
# docker run -i -t -v $(pwd):/home/zas1024/gene -v /path/to/pylmm_gn2/:/home/zas1024/pyLMM -p 5003:5003 gn
RUN git clone /home/zas1024/pyLMM
# MySQL setup
ADD mysql_setup.sql /tmp/mysql_setup.sql
RUN /etc/init.d/mysql start && mysql < /tmp/mysql_setup.sql
# New database adapter setup genenetwork 2
# Requires:
RUN wget --quiet ''
RUN unzip -o -d /var/lib/mysql/
# make sure to set the permissions on the mysql database
RUN chown -R mysql:mysql /var/lib/mysql/db_webqtl_s/
RUN chmod 700 /var/lib/mysql/db_webqtl_s/
RUN chmod 660 /var/lib/mysql/db_webqtl_s/*
# Install R packages required for a working genenetwork R-environment
ADD Renv_setup.R /tmp/Renv_setup.R
RUN Rscript /tmp/Renv_setup.R
# Settings / startup script and other stuff is copied to the root
COPY /root/
COPY /root/
COPY supervisord.conf /etc/supervisor/conf.d/
RUN mkdir -p /var/log/supervisor
RUN source ~/ve27/bin/activate && \
pip install pandas
# until path settings are introduced, simply use the same path
RUN mkdir -p /home/zas1024
CMD ["/usr/bin/supervisord"]