Develop Docker Environment for build/test/deploy of binaries for BRAINSTools
hjmjohnson opened this issue · 1 comments
hjmjohnson commented
BRAINSTools developers need an easier way to build, test, and deploy binaries for the BRAINSTools package.
[ ] - Download Docker for Windows
[ ] - docker pull ubuntu-18.04 LTS release
[ ] - create docker file that installs basic development envirionment
[ ] - MANUALLY clone (git) BRAISTools from github
[ ] - Manually build BRAINSTools
A Dockerfile representation:
FROM neurodebian:stretch-non-free as BRAINSTools-base
MAINTAINER Hans J. Johnson <hans-johnson@uiowa.edu>
## the popularity-contest is causing docker build to hang
ARG DEBIAN_FRONTEND=noninteractive
#RUN apt-get update && echo "no" | apt-get install -y popularity-contest
RUN apt-get update && apt-get install -y \
apt-utils \
build-essential \
ccache \
curl \
git \
subversion \
ninja-build \
python \
vim \
&& apt-get clean
# Using --no-install-recommends greatly reduces the installed packages
#-- DONT NEED LATEX RUN apt-get update && apt-get install -y --no-install-recommends \
#-- DONT NEED LATEX texlive-latex-base \
#-- DONT NEED LATEX texlive-latex-extra
#-- DONT NEED LATEX ghostscript \
#-- DONT NEED LATEX imagemagick \
#-- DONT NEED LATEX python \
#-- DONT NEED LATEX python-pygments \
#-- DONT NEED LATEX latex-xcolor \
#-- DONT NEED LATEX tex4ht \
#-- DONT NEED LATEX texlive-fonts-recommended \
RUN apt-get update && apt-get install -y \
locales \
&& apt-get clean
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
# Install the latest CMake release
WORKDIR /tmp/
#RUN curl -L https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
#python get-pip.py && \
#pip install cmake
#WORKDIR /
# Build and install CMake from source for Ninja build job patch to be released with CMake 3.11
WORKDIR /usr/src
RUN apt-get install -y libncurses-dev libssl-dev && \
git clone https://github.com/Kitware/CMake.git CMake && \
cd CMake && \
git checkout v3.11.1 && \
mkdir /usr/src/CMake-build && \
cd /usr/src/CMake-build && \
/usr/src/CMake/bootstrap \
--parallel=5 \
--prefix=/usr && \
make -j5 && \
./bin/cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON . && \
make install && \
cd .. && \
rm -rf CMake* && \
apt-get clean
WORKDIR /
## https://github.com/poldracklab/fmriprep/blob/master/Dockerfile
WORKDIR /usr/src
RUN apt-get install -y libncurses-dev libssl-dev && \
git clone https://github.com/Kitware/CMake.git CMake && \
cd CMake && \
git checkout v3.11.1 && \
mkdir /usr/src/CMake-build && \
cd /usr/src/CMake-build && \
/usr/src/CMake/bootstrap \
--parallel=5 \
--prefix=/usr && \
make -j5 && \
./bin/cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON . && \
make install && \
cd .. && \
rm -rf CMake* && \
apt-get clean
WORKDIR /
# Build NEP
WORKDIR /usr/src
RUN \
git clone https://github.com/BRAINSia/NAMICExternalProjects.git NAMICExternalProjects && \
cd NAMICExternalProjects && \
git checkout 71c06bf77fa1f050ae7ae44aa467cb9b6122e86b -b NEPDockerBuild && \
mkdir /usr/src/NEP-11 && \
cd /usr/src/NEP-11 && \
cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_OPTIMIZED:BOOL=ON \
/usr/src/NAMICExternalProjects
RUN cd /usr/src/NEP-11 && make -j 8 -k \
&& make -k \
&& make -C BRAINSTools \
find . -name "*.o" -exec rm {} \; && \
find . -name "*.a" -exec rm {} \;
WORKDIR /
JIongbaiLiu commented
Staring working on dock