-
Notifications
You must be signed in to change notification settings - Fork 3
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 #3 from NCI-GDC/update_template
Update template
- Loading branch information
Showing
11 changed files
with
83 additions
and
254 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"template": "[email protected]:NCI-GDC/bio-software-template.git", | ||
"commit": "edc121c807074808a30cbf77e29d89cb1320f16a", | ||
"commit": "7a4a06c3072e31fe76e22beacb12991004410dba", | ||
"context": { | ||
"cookiecutter": { | ||
"repository_name": "biobambam-docker", | ||
"software_name": "biobambam", | ||
"software_version": "1.0.0", | ||
"commit": "edc121c807074808a30cbf77e29d89cb1320f16a", | ||
"software_name": "biobambam2", | ||
"software_version": "2.0.0", | ||
"commit": "7a4a06c3072e31fe76e22beacb12991004410dba", | ||
"_template": "[email protected]:NCI-GDC/bio-software-template.git" | ||
} | ||
}, | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,19 @@ | ||
SOFTWARE := "biobambam" | ||
DOCKERFILE := "./Dockerfile" | ||
SOFTWARE := "biobambam2" | ||
DOCKERFILE := "../Dockerfile.multi" | ||
BASE_CONTAINER_REGISTRY := env_var_or_default("BASE_CONTAINER_REGISTRY", "docker.osdc.io") | ||
|
||
VERSION := `basename $(pwd)` | ||
VERSION := "2.0.95-release-20190320141403" | ||
|
||
emit-dockerfile: | ||
@echo {{DOCKERFILE}} | ||
|
||
emit-version: | ||
@echo {{VERSION}} | ||
|
||
build-docker: | ||
docker buildx build --compress --progress plain \ | ||
-t "{{SOFTWARE}}-{{VERSION}}" \ | ||
-f {{DOCKERFILE}} \ | ||
. \ | ||
--build-arg VERSION="{{VERSION}}" \ | ||
--build-arg REGISTRY="{{BASE_CONTAINER_REGISTRY}}" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,77 +1,65 @@ | ||
ARG REPOSITORY=docker.osdc.io | ||
ARG BUILDER_TAG=2.2.0 | ||
FROM ${REPOSITORY}/ncigdc/base-u22.04-builder:${BUILDER_TAG} AS builder | ||
ARG BUILDER_TAG=3.1.0 | ||
|
||
FROM scratch AS src | ||
|
||
ENV LIBMAUS_VERSION=2.0.610-release-20190328154814 | ||
ARG VERSION | ||
ENV BIOBAMBAM_VERSION=${VERSION} | ||
|
||
ADD https://gitlab.com/german.tischler/libmaus2/-/archive/$LIBMAUS_VERSION/libmaus2-$LIBMAUS_VERSION.tar.gz /libmaus2.tar.gz | ||
ADD https://gitlab.com/german.tischler/biobambam2/-/archive/$BIOBAMBAM_VERSION/biobambam2-$BIOBAMBAM_VERSION.tar.gz /biobambam2.tar.gz | ||
|
||
FROM ${REPOSITORY}/ncigdc/amzn2023-builder:${BUILDER_TAG} AS builder | ||
|
||
ENV LIBMAUS_VERSION=2.0.610-release-20190328154814 | ||
ARG VERSION | ||
ENV BIOBAMBAM_VERSION=${VERSION} | ||
|
||
RUN --mount=from=src,target=/src <<EOF | ||
mkdir -p /libmaus2 | ||
tar -oxzf /src/libmaus2.tar.gz -C /libmaus2 | ||
EOF | ||
|
||
RUN --mount=from=src,target=/src <<EOF | ||
mkdir -p /biobambam2 | ||
tar -oxzf /src/biobambam2.tar.gz -C /biobambam2 | ||
EOF | ||
|
||
RUN dnf install -y \ | ||
autoconf \ | ||
g++ \ | ||
libtool \ | ||
zlib-devel \ | ||
boost-devel \ | ||
automake | ||
|
||
ENV INSTALLDIR=/biobambam | ||
|
||
RUN mkdir -p ${INSTALLDIR} | ||
|
||
WORKDIR /libmaus2/libmaus2-$LIBMAUS_VERSION | ||
|
||
RUN <<EOF | ||
JOBS=$(cat /proc/cpuinfo | egrep "^processor" | wc -l) | ||
libtoolize | ||
aclocal | ||
autoreconf -i -f | ||
./configure --prefix=${INSTALLDIR} | ||
make -j ${JOBS} | ||
make -j ${JOBS} install | ||
EOF | ||
|
||
WORKDIR /biobambam2/biobambam2-$BIOBAMBAM_VERSION | ||
|
||
RUN <<EOF | ||
JOBS=$(cat /proc/cpuinfo | egrep "^processor" | wc -l) | ||
autoreconf -i -f | ||
LDFLAGS="-Wl,-rpath=$INSTALLDIR/lib -Wl,-z -Wl,origin" ./configure --with-libmaus2=${INSTALLDIR} --prefix=${INSTALLDIR} | ||
make -j ${JOBS} | ||
make -j ${JOBS} install | ||
EOF | ||
|
||
ENV PATH=/biobambam/bin:$PATH | ||
|
||
ENV URL=https://path/to/file/$VERSION/software-$VERSION.tar.gz | ||
&& curl --silent https://gitlab.com/german.tischler/libmaus2/repository/archive.tar.gz\?ref\=2.0.610-release-20190328154814 -o libmaus2.tar.gz \ | ||
&& curl --silent https://gitlab.com/german.tischler/biobambam2/repository/archive.tar.gz\?ref\=2.0.95-release-20190320141403 -o biobambam2.tar.gz \ | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Example download and compile step | ||
RUN wget $URL \ | ||
&& tar xf software-${VERSION}.tar.gz \ | ||
&& cd software-${VERSION} \ | ||
&& make \ | ||
&& mv bin/* /usr/local/bin \ | ||
&& cd .. \ | ||
&& rm -rf software-${VERSION} | ||
|
||
# For a multi-stage build | ||
|
||
FROM ${REPOSITORY}/ncigdc/base-u22.04:${BUILDER_TAG} | ||
|
||
COPY --from=builder /usr/local/* /usr/local/ | ||
FROM ubuntu:disco-20190310 | ||
|
||
MAINTAINER Jeremiah H. Savage <[email protected]> | ||
|
||
ENV LD_LIBRARY_PATH /usr/local/lib | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
autoconf \ | ||
curl \ | ||
g++ \ | ||
libtool \ | ||
pkg-config \ | ||
zlib1g-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /usr/local/* \ | ||
|
||
&& libmaus2files=$(tar -axvf libmaus2.tar.gz) \ | ||
&& libmaus2dir=$(echo ${libmaus2files} | cut -f1 -d" ") \ | ||
&& cd ${libmaus2dir} \ | ||
&& libtoolize \ | ||
&& aclocal \ | ||
&& autoreconf -i -f \ | ||
&& ./configure \ | ||
&& make -j4 \ | ||
&& make install \ | ||
&& cd ../ \ | ||
&& rm -rf ${libmaus2dir} libmaus2.tar.gz \ | ||
&& biobambam2files=$(tar -axvf biobambam2.tar.gz) \ | ||
&& biobambam2dir=$(echo ${biobambam2files} | cut -f1 -d" ") \ | ||
&& cd ${biobambam2dir} \ | ||
&& export LIBMAUSPREFIX=/usr/local \ | ||
&& autoreconf -i -f \ | ||
&& ./configure --with-libmaus2=${LIBMAUSPREFIX} \ | ||
&& make -j4 \ | ||
&& make install \ | ||
&& cd ../ \ | ||
&& rm -rf ${biobambam2dir} biobambam2.tar.gz \ | ||
&& apt-get remove --purge -y \ | ||
autoconf \ | ||
curl \ | ||
g++ \ | ||
libtool \ | ||
pkg-config \ | ||
zlib1g-dev \ | ||
&& apt-get autoremove -y \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] |
Oops, something went wrong.