From 40948b5ac6450e93260381eeeb59c5832b9ae793 Mon Sep 17 00:00:00 2001 From: J Wokaty Date: Mon, 14 Jun 2021 11:39:25 -0400 Subject: [PATCH] Move dependencies out of Dockerfile - Add bin/install.sh to install BBS dependencies - Add Ubuntu-files to track docker-specific dependencies - Move install.R to bin --- Dockerfile | 128 ++-------------------------- Ubuntu-files/20.04/apt_required.txt | 44 ++++++++++ Ubuntu-files/20.04/apt_skip.txt | 48 +++++++++++ Ubuntu-files/20.04/pip_skip.txt | 6 ++ bin/.install.sh.swp | Bin 0 -> 12288 bytes install.R => bin/install.R | 0 bin/install.sh | 55 ++++++++++++ 7 files changed, 158 insertions(+), 123 deletions(-) create mode 100644 Ubuntu-files/20.04/apt_required.txt create mode 100644 Ubuntu-files/20.04/apt_skip.txt create mode 100644 Ubuntu-files/20.04/pip_skip.txt create mode 100644 bin/.install.sh.swp rename install.R => bin/install.R (100%) create mode 100644 bin/install.sh diff --git a/Dockerfile b/Dockerfile index 3129d1a..d997243 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG BIOCONDUCTOR_VERSION=3.14 ##### IMPORTANT ######## ## The PATCH version number should be incremented each time ## there is a change in the Dockerfile. -ARG BIOCONDUCTOR_PATCH=2 +ARG BIOCONDUCTOR_PATCH=3 ARG BIOCONDUCTOR_DOCKER_VERSION=${BIOCONDUCTOR_VERSION}.${BIOCONDUCTOR_PATCH} LABEL name="bioconductor/bioconductor_docker" \ @@ -29,133 +29,15 @@ RUN dpkg --clear-avail # 'debconf: unable to initialize frontend: Dialog' ENV DEBIAN_FRONTEND noninteractive -# Update apt-get -RUN apt-get update \ - && apt-get install -y --no-install-recommends apt-utils \ - && apt-get install -y --no-install-recommends \ - ## Basic deps - gdb \ - libxml2-dev \ - python3-pip \ - libz-dev \ - liblzma-dev \ - libbz2-dev \ - libpng-dev \ - libgit2-dev \ - ## sys deps from bioc_full - pkg-config \ - fortran77-compiler \ - byacc \ - automake \ - curl \ - ## This section installs libraries - libpcre2-dev \ - libnetcdf-dev \ - libhdf5-serial-dev \ - libfftw3-dev \ - libopenbabel-dev \ - libopenmpi-dev \ - libxt-dev \ - libudunits2-dev \ - libgeos-dev \ - libproj-dev \ - libcairo2-dev \ - libtiff5-dev \ - libreadline-dev \ - libgsl0-dev \ - libgslcblas0 \ - libgtk2.0-dev \ - libgl1-mesa-dev \ - libglu1-mesa-dev \ - libgmp3-dev \ - libhdf5-dev \ - libncurses-dev \ - libbz2-dev \ - libxpm-dev \ - liblapack-dev \ - libv8-dev \ - libgtkmm-2.4-dev \ - libmpfr-dev \ - libmodule-build-perl \ - libapparmor-dev \ - libprotoc-dev \ - librdf0-dev \ - libmagick++-dev \ - libsasl2-dev \ - libpoppler-cpp-dev \ - libprotobuf-dev \ - libpq-dev \ - libperl-dev \ - ## software - perl extentions and modules - libarchive-extract-perl \ - libfile-copy-recursive-perl \ - libcgi-pm-perl \ - libdbi-perl \ - libdbd-mysql-perl \ - libxml-simple-perl \ - libmysqlclient-dev \ - default-libmysqlclient-dev \ - libgdal-dev \ - ## new libs - libglpk-dev \ - ## Databases and other software - sqlite \ - openmpi-bin \ - mpi-default-bin \ - openmpi-common \ - openmpi-doc \ - tcl8.6-dev \ - tk-dev \ - default-jdk \ - imagemagick \ - tabix \ - ggobi \ - graphviz \ - protobuf-compiler \ - jags \ - ## Additional resources - xfonts-100dpi \ - xfonts-75dpi \ - biber \ - libsbml5-dev \ - libzmq3-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +COPY bin /tmp +COPY Ubuntu-files /tmp -## Python installations -RUN apt-get update \ - && apt-get install -y software-properties-common \ - && add-apt-repository universe \ - && apt-get update \ - && apt-get -y --no-install-recommends install python2 python-dev \ - && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ - && python2 get-pip.py \ - && pip2 install wheel \ - ## Install sklearn and pandas on python - && pip2 install sklearn \ - pandas \ - pyyaml \ - cwltool \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf get-pip.py - -## FIXME -## These two libraries don't install in the above section--WHY? -RUN apt-get update \ - && apt-get -y --no-install-recommends install \ - libmariadb-dev-compat \ - libjpeg-dev \ - libjpeg-turbo8-dev \ - libjpeg8-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +# Install dependencies +RUN /bin/bash -C /tmp/install.sh ## Add host-site-library RUN echo "R_LIBS=/usr/local/lib/R/host-site-library:\${R_LIBS}" > /usr/local/lib/R/etc/Renviron.site -ADD install.R /tmp/ - RUN R -f /tmp/install.R # DEVEL: Add sys env variables to DEVEL image diff --git a/Ubuntu-files/20.04/apt_required.txt b/Ubuntu-files/20.04/apt_required.txt new file mode 100644 index 0000000..58cff70 --- /dev/null +++ b/Ubuntu-files/20.04/apt_required.txt @@ -0,0 +1,44 @@ +# APT required +byacc +curl +default-libmysqlclient-dev +fortran77-compiler +ggobi +imagemagick +libapparmor-dev +libarchive-extract-perl +libbz2-dev +libcgi-pm-perl +libdbd-mysql-perl +libdbi-perl +libfile-copy-recursive-perl +libgl1-mesa-dev +libgmp3-dev +libgsl0-dev +libgslcblas0 +libhdf5-dev +libhdf5-serial-dev +libjpeg8-dev +libjpeg-turbo8-dev +liblapack-dev +#libmariadb-dev-compat # Depends on libmariadb-dev, conflicts with libmysqlclient-dev +libmodule-build-perl +libncurses-dev +libopenmpi-dev +libperl-dev +libprotoc-dev +librdf0-dev +libtiff5-dev +libxml-simple-perl +libxpm-dev +libz-dev +libzmq3-dev +mpi-default-bin +openmpi-bin +openmpi-common +openmpi-doc +pkg-config +software-properties-common +sqlite +tabix +tcl8.6-dev diff --git a/Ubuntu-files/20.04/apt_skip.txt b/Ubuntu-files/20.04/apt_skip.txt new file mode 100644 index 0000000..82c66c8 --- /dev/null +++ b/Ubuntu-files/20.04/apt_skip.txt @@ -0,0 +1,48 @@ +# APT skip +build-essential +clustalo +fuse +gfortran +git +gobjc +gsfonts-x11 +infernal +kallisto +libavfilter-dev +libcurl4-openssl-dev +libeigen3-dev +libfribidi-dev +libfuse-dev +libgmp-dev # BD uses libgmp3-dev +libgraphviz-dev +libgsl-dev # BD uses libgsl0-dev +libicu-dev +librsvg2-dev +libssl-dev +libtiff-dev # BD uses libtiff5-dev +libx11-dev +manpages-dev +mlocate +mpi-default-dev # BD uses mpi-default-bin +ocl-icd-opencl-dev +pandoc +pandoc-citeproc +t1-xfree86-nonfree +tcl-dev # BD uses tcl8.6-dev +texi2html +texinfo +texlive +texlive-bibtex-extra +texlive-fonts-extra +texlive-font-utils +texlive-lang-european +texlive-latex-extra +texlive-luatex +texlive-pstricks +texlive-science +tree +ttf-xfree86-nonfree +ttf-xfree86-nonfree-syriac +xfonts-base # BD uses xfonts-100dpi and xfonts-75dpi +xfonts-scalable +zlib1g-dev diff --git a/Ubuntu-files/20.04/pip_skip.txt b/Ubuntu-files/20.04/pip_skip.txt new file mode 100644 index 0000000..d22f83d --- /dev/null +++ b/Ubuntu-files/20.04/pip_skip.txt @@ -0,0 +1,6 @@ +cwltool +pandas +pyyaml +sklearn +tensorflow +wheel diff --git a/bin/.install.sh.swp b/bin/.install.sh.swp new file mode 100644 index 0000000000000000000000000000000000000000..c8821f7613bac9650480d2ef1a12e33cabf6b6cb GIT binary patch literal 12288 zcmeI2O^X~w7{_ZR5H&_c{Q%GQ4A~d$>3vc1=H##n8dL~|D7q$Nb$88lG1D)ps@dH! zx}F5_ zxb({Tm*`Yync?>^V?U%{y}5Pd)0yY5A7!cFCgcNKbKo!Gqm=^#>dNi9!{F6i4TCkA zM|l>HBa^EjoOI0MdrGvEx|Z3av+!`{WD?x`nsvVP9&d)BY+;S4wf&VV!E3^)VM zfHU9>I0MdrGvEw31OGzI0Y8KP0a5*VCVUbovZsf1I~am;0!ne z&VVy;HyG$kMx;^-Oj-nsy<#}fO!mnLZOG5aYtQ#(7MIoJr+h0Gg-K``bvzX`SGAZU zzfdwmi>qU47QC}$5|ObMy)4pvLr`Cigl4Re#VXa;GpUWYYPc4iudZwoim2exkPmD) z(TNkp3*!%jp=cy{W($z3ulf{ha21SX7$5*oZFI1>w?#9MKOx`Ga=(7}m5A~*6WewzO19|a*|$H1Khm8Vq{(>A`z z^4~-QX-IEM6D8Qlif2)Rx~jM@Y-z6KKxR{wINsKqSDNjTmvU`{^5}AXZV_RK@<3c$ zyNKTG5YZ^l1hthY@|`NOC*?ZLk{^@T#P4>~qUUgM*%n&j!uo`eWkQ$2ac0JTeIz!Y zUbkxB-VjR5JoA{fSH{#e$RwC<8cc> /tmp/bbs_apt_pkgs +cat $bd_files/apt_*.txt | awk '/^[^#]/ {print $1}' | sort >> /tmp/skip_apt_pkgs +apt_pkgs=$(comm -23 /tmp/bbs_apt_pkgs /tmp/skip_apt_pkgs) + +# Constructing array of pip packages, removing unnecessary packages. +cat $bbs_files/pip_*.txt | awk '/^[^#]/ {print $1}' | sort >> /tmp/bbs_pip_pkgs +cat $bd_files/pip_*.txt | awk '/^[^#]/ {print $1}' | sort >> /tmp/skip_pip_pkgs +pip_pkgs=$(comm -23 /tmp/bbs_pip_pkgs /tmp/skip_pip_pkgs) + +# Packages always required by Bioconductor Docker +apt_required_pkgs=$(cat $bd_files/apt_required.txt | awk '/^[^#]/ {print $1}') + +# Install dependencies + +# Install apt packages +apt-get update \ + && apt-get install -y --no-install-recommends apt-utils + +apt-get update \ + && apt-get install -y --no-install-recommends $apt_pkgs + +apt-get update \ + && apt-get install -y --no-install-recommends $apt_required_pkgs \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install pip packages +pip3 install $pip_pkgs + +# Remove files +if test -n "$(find /tmp -maxdepth 1 -name '*_pkgs' -print -quit)"; then + rm /tmp/*_pkgs +fi