stencila/cli

Install commonly used system packages in base images

Closed this issue · 1 comments

Sibyl builds customised containers when a folder contains a language requirements file (e.g. r-requires.tst). When building customised containers, Sibyl should be optimised for speed by installing commonly used system packages in the base images. "Commonly used" should include:

  1. system packages required by more than one of the supported language runtimes (i.e. R, Python, Node) - avoids long build times when installing customised containers

  2. any package required by a commonly used language package (e.g. R devtools requires Ubuntu libssl-dev) - avoids build failures on package installation

As an example of the need for 1, at time of writing the following command to install R:

apt-get install -y --no-install-recommends r-base-core r-base-dev

required a lot of system packages to be installed:

The following additional packages will be installed:
  autoconf automake autotools-dev bsdmainutils cdbs debhelper
  dh-strip-nondeterminism dh-translations fontconfig fontconfig-config
  fonts-dejavu-core gettext gettext-base groff-base icu-devtools intltool
  intltool-debian libarchive-zip-perl libasprintf0v5 libblas-common
  libblas-dev libblas3 libbz2-dev libcairo2 libcroco3 libdatrie1
  libencode-locale-perl libfile-listing-perl libfile-stripnondeterminism-perl
  libfontconfig1 libfreetype6 libgraphite2-3 libharfbuzz0b libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libice6 libicu-dev
  libio-html-perl libio-socket-ssl-perl libjbig0 libjpeg-dev libjpeg-turbo8
  libjpeg-turbo8-dev libjpeg8 libjpeg8-dev liblapack-dev liblapack3
  liblwp-mediatypes-perl liblwp-protocol-https-perl liblzma-dev
  libncurses5-dev libnet-http-perl libnet-ssleay-perl libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpcre16-3
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libpipeline1 libpixman-1-0 libpng12-0
  libpng12-dev libpython-stdlib libpython2.7-minimal libpython2.7-stdlib
  libreadline-dev libreadline6-dev libsigsegv2 libsm6 libtcl8.6 libthai-data
  libthai0 libtiff5 libtimedate-perl libtinfo-dev libtk8.6 libunistring0
  liburi-perl libwww-perl libwww-robotrules-perl libx11-6 libx11-data libxau6
  libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxft2
  libxml-parser-perl libxmuu1 libxrender1 libxss1 libxt6 m4 man-db pkg-config
  po-debconf python python-minimal python-pkg-resources python-scour
  python-six python2.7 python2.7-minimal tzdata unzip x11-common xauth
  xdg-utils zip
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool wamerican | wordlist
  whois vacation devscripts dh-make gettext-doc autopoint groff
  liblapack-doc-man liblapack-doc libdata-dump-perl icu-doc
  libcrypt-ssleay-perl liblzma-doc ncurses-doc readline-doc tcl8.6 tk8.6
  libauthen-ntlm-perl less www-browser libmail-box-perl python-doc python-tk
  python-setuptools python-rsvg python-cairo python2.7-doc binfmt-support ess
  r-doc-info | r-doc-pdf r-mathlib r-base-html texlive-base texlive-latex-base
  texlive-generic-recommended texlive-fonts-recommended texlive-fonts-extra
  texlive-extra-utils texlive-latex-recommended texlive-latex-extra texinfo
  gvfs-bin
Recommended packages:
  libasprintf-dev libgettextpo-dev bzip2-doc libhtml-format-perl
  libhtml-form-perl libhttp-daemon-perl libmailtools-perl
  libmail-sendmail-perl r-recommended r-doc-html libfile-mimeinfo-perl
  libnet-dbus-perl libx11-protocol-perl x11-utils x11-xserver-utils
The following NEW packages will be installed:
  autoconf automake autotools-dev bsdmainutils cdbs debhelper
  dh-strip-nondeterminism dh-translations fontconfig fontconfig-config
  fonts-dejavu-core gettext gettext-base groff-base icu-devtools intltool
  intltool-debian libarchive-zip-perl libasprintf0v5 libblas-common
  libblas-dev libblas3 libbz2-dev libcairo2 libcroco3 libdatrie1
  libencode-locale-perl libfile-listing-perl libfile-stripnondeterminism-perl
  libfontconfig1 libfreetype6 libgraphite2-3 libharfbuzz0b libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libice6 libicu-dev
  libio-html-perl libio-socket-ssl-perl libjbig0 libjpeg-dev libjpeg-turbo8
  libjpeg-turbo8-dev libjpeg8 libjpeg8-dev liblapack-dev liblapack3
  liblwp-mediatypes-perl liblwp-protocol-https-perl liblzma-dev
  libncurses5-dev libnet-http-perl libnet-ssleay-perl libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils libpaper1 libpcre16-3
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libpipeline1 libpixman-1-0 libpng12-0
  libpng12-dev libpython-stdlib libpython2.7-minimal libpython2.7-stdlib
  libreadline-dev libreadline6-dev libsigsegv2 libsm6 libtcl8.6 libthai-data
  libthai0 libtiff5 libtimedate-perl libtinfo-dev libtk8.6 libunistring0
  liburi-perl libwww-perl libwww-robotrules-perl libx11-6 libx11-data libxau6
  libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxft2
  libxml-parser-perl libxmuu1 libxrender1 libxss1 libxt6 m4 man-db pkg-config
  po-debconf python python-minimal python-pkg-resources python-scour
  python-six python2.7 python2.7-minimal r-base-core r-base-dev tzdata unzip
  x11-common xauth xdg-utils zip

It may be useful to use apt-cache showpkg <package> to see which dependencies are shared by language runtimes and to install them in the base image.

Closing, this now belongs in https://github.com/stencila/images