-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from cancerit/feature/docker
Feature/docker
- Loading branch information
Showing
7 changed files
with
310 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/LICENCE | ||
/prerelease.sh | ||
/README.md | ||
/INSTALL | ||
/LICENCE | ||
/CHANGES.md | ||
/.gitignore | ||
/.git | ||
/perl/docs | ||
/perl/docs.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
FROM quay.io/wtsicgp/dockstore-cgpmap:3.1.4 as builder | ||
|
||
USER root | ||
|
||
# ALL tool versions used by opt-build.sh | ||
ENV VER_CGPVCF="v2.2.1" | ||
ENV VER_VCFTOOLS="0.1.16" | ||
|
||
RUN apt-get -yq update | ||
RUN apt-get install -yq --no-install-recommends \ | ||
locales \ | ||
g++ \ | ||
make \ | ||
gcc \ | ||
pkg-config \ | ||
zlib1g-dev | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
RUN update-locale LANG=en_US.UTF-8 | ||
|
||
ENV OPT /opt/wtsi-cgp | ||
ENV PATH $OPT/bin:$OPT/biobambam2/bin:$PATH | ||
ENV PERL5LIB $OPT/lib/perl5 | ||
ENV LD_LIBRARY_PATH $OPT/lib | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
|
||
# build tools from other repos | ||
ADD build/opt-build.sh build/ | ||
RUN bash build/opt-build.sh $OPT | ||
|
||
# build the tools in this repo, separate to reduce build time on errors | ||
COPY . . | ||
RUN bash build/opt-build-local.sh $OPT | ||
|
||
FROM ubuntu:16.04 | ||
|
||
LABEL maintainer="[email protected]" \ | ||
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \ | ||
version="1.0.0" \ | ||
description="cgpPindel docker" | ||
|
||
RUN apt-get -yq update | ||
RUN apt-get install -yq --no-install-recommends \ | ||
apt-transport-https \ | ||
locales \ | ||
curl \ | ||
ca-certificates \ | ||
libperlio-gzip-perl \ | ||
bzip2 \ | ||
psmisc \ | ||
time \ | ||
zlib1g \ | ||
liblzma5 \ | ||
libncurses5 \ | ||
p11-kit \ | ||
unattended-upgrades && \ | ||
unattended-upgrade -d -v && \ | ||
apt-get remove -yq unattended-upgrades && \ | ||
apt-get autoremove -yq | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
RUN update-locale LANG=en_US.UTF-8 | ||
|
||
ENV OPT /opt/wtsi-cgp | ||
ENV PATH $OPT/bin:$OPT/biobambam2/bin:$PATH | ||
ENV PERL5LIB $OPT/lib/perl5 | ||
ENV LD_LIBRARY_PATH $OPT/lib | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
|
||
RUN mkdir -p $OPT | ||
COPY --from=builder $OPT $OPT | ||
|
||
## USER CONFIGURATION | ||
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu | ||
|
||
USER ubuntu | ||
WORKDIR /home/ubuntu | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#! /bin/bash | ||
|
||
set -xe | ||
|
||
if [[ -z "${TMPDIR}" ]]; then | ||
TMPDIR=/tmp | ||
fi | ||
|
||
set -u | ||
|
||
if [ "$#" -lt "1" ] ; then | ||
echo "Please provide an installation path such as /opt/ICGC" | ||
exit 1 | ||
fi | ||
|
||
# get path to this script | ||
SCRIPT_PATH=`dirname $0`; | ||
SCRIPT_PATH=`(cd $SCRIPT_PATH && pwd)` | ||
|
||
# get the location to install to | ||
INST_PATH=$1 | ||
mkdir -p $1 | ||
INST_PATH=`(cd $1 && pwd)` | ||
echo $INST_PATH | ||
|
||
# get current directory | ||
INIT_DIR=`pwd` | ||
|
||
CPU=`grep -c ^processor /proc/cpuinfo` | ||
if [ $? -eq 0 ]; then | ||
if [ "$CPU" -gt "6" ]; then | ||
CPU=6 | ||
fi | ||
else | ||
CPU=1 | ||
fi | ||
echo "Max compilation CPUs set to $CPU" | ||
|
||
SETUP_DIR=$INIT_DIR/install_tmp | ||
mkdir -p $SETUP_DIR/distro # don't delete the actual distro directory until the very end | ||
mkdir -p $INST_PATH/bin | ||
cd $SETUP_DIR | ||
|
||
# make sure tools installed can see the install loc of libraries | ||
set +u | ||
export LD_LIBRARY_PATH=`echo $INST_PATH/lib:$LD_LIBRARY_PATH | perl -pe 's/:\$//;'` | ||
export PATH=`echo $INST_PATH/bin:$PATH | perl -pe 's/:\$//;'` | ||
export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/:\$//;'` | ||
export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'` | ||
set -u | ||
|
||
## cgpPindel - should be the build root | ||
if [ ! -e $SETUP_DIR/cgpPindel.success ]; then | ||
cd $INIT_DIR | ||
if [ ! -e $SETUP_DIR/cgpPindel_c.success ]; then | ||
g++ -O3 -o $INST_PATH/bin/pindel c++/pindel.cpp | ||
g++ -O3 -o $INST_PATH/bin/filter_pindel_reads c++/filter_pindel_reads.cpp | ||
touch $SETUP_DIR/cgpPindel_c.success | ||
fi | ||
cd perl | ||
cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps . | ||
cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH . | ||
cd $SETUP_DIR | ||
touch $SETUP_DIR/cgpPindel.success | ||
fi |
Oops, something went wrong.