Skip to content

Commit

Permalink
updates to run on rhino servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Warth committed Nov 6, 2015
1 parent b207586 commit 31cff2c
Show file tree
Hide file tree
Showing 31 changed files with 156 additions and 15 deletions.
2 changes: 1 addition & 1 deletion R/utils.r
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# install any missing packages
# http://stackoverflow.com/a/19873732/1135316
if (!suppressMessages(require("pacman"))) install.packages("pacman")
pacman::p_load(ape, dplyr, ggplot2, stringr, Biostrings, readr, tidyr, seqinr, DECIPHER, functional)
pacman::p_load(ape, dplyr, ggplot2, stringr, readr, tidyr, seqinr, functional)

# turn off annoying progress bar
options(dplyr.show_progress=FALSE)
Expand Down
2 changes: 1 addition & 1 deletion bin/keele
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if (!suppressMessages(require("pacman"))) install.packages("pacman")
pacman::p_load(optparse)

search.source <- function(file, path=c('.', '../R', '~/src/matsen/hiv-sim/vidd/R'), ...)
search.source <- function(file, path=c('.', 'R'), ...)
{
for (p in path) {
fp <- file.path(p, file)
Expand Down
96 changes: 96 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Create an image with that looks like a naive user on the rhino servers.
#
# This Dockerfile will compile and install both Beast and
#
FROM r-base
MAINTAINER Chris Warth [email protected]

ENV HOME /root
WORKDIR ${HOME}

ADD Dockerfile ${HOME}/Dockerfile

RUN apt-get update -qq
RUN apt-get dist-upgrade -y

# Install tools needed to compile Beast and Beagle.
#
RUN apt-get install -y ant build-essential autoconf automake libtool subversion pkg-config

RUN apt-get install -y \
python-dev \
wget \
openssh-client \
git \
pandoc \
lmodern \
openjdk-7-jdk \
openjdk-7-jre-headless \
cmake \
samtools \
freetype* \
pkg-config \
libcurl4-openssl-dev \
libxml2-dev \
libssl-dev

RUN wget -q https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN pip install --upgrade distribute

RUN pip install virtualenv

# # Make ssh dir
WORKDIR /root

# Make ssh dir
RUN mkdir /root/.ssh/

# Copy over private key, and set permissions
ADD id_rsa-github_readonly_user /root/.ssh/id_rsa
RUN chmod 700 /root/.ssh/id_rsa

# Create known_hosts
RUN touch /root/.ssh/known_hosts

# Add bitbuckets key
RUN ssh-keyscan -T 60 github.com >> /root/.ssh/known_hosts

# clone repo and remove private key
RUN git clone --recursive [email protected]:matsengrp/founder-inference-bakeoff.git
RUN rm -f /root/.ssh/id_rsa

ADD Dockerfile /root/Dockerfile

# Clone and compile Beagle from sources
RUN git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git
WORKDIR ${HOME}/beagle-lib
RUN ./autogen.sh
RUN ./configure --disable-sse --disable-march-native --prefix=/usr/local
RUN make install
#RUN rm -rf ${HOME}/beagle-lib

# Clone and install Beast from sources
WORKDIR ${HOME}
RUN git clone https://github.com/beast-dev/beast-mcmc.git
WORKDIR ${HOME}/beast-mcmc
RUN ant linux
RUN mv ${HOME}/beast-mcmc/release/Linux/BEASTv1.8.3pre ${HOME}/
#RUN rm -rf ${HOME}/beast-mcmc
# this leaves the compiled BEAST jar file in ${HOME}/BEASTv1.8.3pre/


# make beagle libraries and Beast script accessible
RUN echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ${HOME}/.bashrc
ENV LD_LIBRARY_PATH /usr/local/lib:${LD_LIBRARY_PATH}

# make beast scripts accessilbe on PATH
RUN echo 'export PATH=BEASTv1.8.3pre/bin:$PATH' >> ${HOME}/.bashrc

# Clean-up
RUN apt-get -y autoremove
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

CMD bash


27 changes: 27 additions & 0 deletions docker/id_rsa-github_readonly_user
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEArwcmtWh09SOBKCqTUkGJkn3Yqycv5/K5TzhyOfIMIMtxT5sN
P8B2mqy4KWqut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n3mNK
9LshtBnvo3ZS4+tDyXhIHTaO9VMxlNY+bKm0s0G6hfXDZaQgSlrpUEj4qB5oelpA
S9GP+XaS1UNeOo6LtjRJjQKBgCBtqDskEuLlzRs3ykV03Uy9vOup8lrL4QQksCN4
yfn1Bo5gCvyKiBDefe205j16soYR0iE3HDIXniuIHL1/PDWZggOxNZUnER5y12XX
yjhBcX6+KyDPj1cluUXWdESx4MB05ImcewCRLtIclcYzuzuf02hYCsy60R3O+ZHg
8C8hAoGAcwh31ZXhfBOdGzaKXB6lbvyCuS+Lbgq/HcILx3ytOAh7DPx+/coBkVKx
FS6+VdGdPvLEUflmbWGe2NFfXNoJhwxzxCaK9hSHEUnU/t7i9VF1p9IcDdQ9NJG+
mB4HtXNaiMcaGgLRI9OXquCE+p4lVcHSgXWhXBcCItTEjONPfEo=
-----END RSA PRIVATE KEY-----
2 changes: 1 addition & 1 deletion venv/bin/activate
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deactivate () {
# unset irrelevant variables
deactivate nondestructive

VIRTUAL_ENV="/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv"
VIRTUAL_ENV="venv"
export VIRTUAL_ENV

_OLD_VIRTUAL_PATH="$PATH"
Expand Down
7 changes: 5 additions & 2 deletions venv/bin/easy_install
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/bin/python
#!/usr/bin/env python2.7

import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this


# -*- coding: utf-8 -*-
import re
Expand All @@ -8,4 +11,4 @@ from setuptools.command.easy_install import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(main())
7 changes: 5 additions & 2 deletions venv/bin/easy_install-2.7
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/bin/python
#!/usr/bin/env python2.7

import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this


# -*- coding: utf-8 -*-
import re
Expand All @@ -8,4 +11,4 @@ from setuptools.command.easy_install import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(main())
7 changes: 5 additions & 2 deletions venv/bin/f2py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/bin/python
#!/usr/bin/env python2.7

import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this

# See http://cens.ioc.ee/projects/f2py2e/
import os
import sys
Expand All @@ -23,4 +26,4 @@ elif mode == "2e-numpy":
else:
sys.stderr.write("Unknown mode: " + repr(mode) + "\\n")
sys.exit(1)
main()
main()
7 changes: 5 additions & 2 deletions venv/bin/pip
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/bin/python
#!/usr/bin/env python2.7

import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this


# -*- coding: utf-8 -*-
import re
Expand All @@ -8,4 +11,4 @@ from pip import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(main())
7 changes: 5 additions & 2 deletions venv/bin/pip2
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/bin/python
#!/usr/bin/env python2.7

import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this


# -*- coding: utf-8 -*-
import re
Expand All @@ -8,4 +11,4 @@ from pip import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(main())
7 changes: 5 additions & 2 deletions venv/bin/pip2.7
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/shared/silo_researcher/Matsen_F/MatsenGrp/working/cwarth/founder-inference-bakeoff/venv/bin/python
#!/usr/bin/env python2.7

import os; activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 'exec'), dict(__file__=activate_this)); del os, activate_this


# -*- coding: utf-8 -*-
import re
Expand All @@ -8,4 +11,4 @@ from pip import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
sys.exit(main())
Binary file modified venv/bin/python
Binary file not shown.
Binary file modified venv/lib/python2.7/UserDict.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/_abcoll.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/_weakrefset.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/abc.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/codecs.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/copy_reg.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/fnmatch.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/genericpath.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/linecache.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/locale.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/os.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/posixpath.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/re.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/sre_compile.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/sre_constants.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/sre_parse.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/stat.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/types.pyc
Binary file not shown.
Binary file modified venv/lib/python2.7/warnings.pyc
Binary file not shown.

0 comments on commit 31cff2c

Please sign in to comment.