Skip to content

Commit

Permalink
Jammy and some package updates for it (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaynton authored Sep 25, 2023
1 parent 8d73ce0 commit 4e85e45
Show file tree
Hide file tree
Showing 18 changed files with 533 additions and 87 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ jobs:
run: echo "matrix=$(ls -1 -d packages/* | grep -v gsl | tr '\n' '\0' | xargs -0 -n 1 basename | jq -Rsc '. / "\n" - [""]')" >> $GITHUB_OUTPUT

test-package:
name: ${{ matrix.stack }}
name: ${{ matrix.stack }} on ${{ matrix.os }}
needs: list-tests
runs-on: ubuntu-latest
strategy:
matrix:
stack: ${{ fromJSON(needs.list-tests.outputs.matrix) }}
os: [focal, jammy]
container:
image: rstudio/shinyapps-package-dependencies:focal
image: rstudio/shinyapps-package-dependencies:${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: ./test ${{ matrix.stack }}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## September 22nd 2023

### Added
* Dockerfile and `make` / CI configurations for an Ubuntu jammy (22.04)-based environment.

### UPDATED
* Updated packages as necessary to support jammy as a base OS.
* `dockxtractr` is available in jammy, but the installation currently supports .docx only, not .doc.

### REMOVED
* `magick` no longer needs any extra packages installed to function properly.
* `convertGraph` was removed from CRAN and has only one archived release from 2016, so is not being supported in this repository.

## March 15th 2021

### UPDATED
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Steps
=====
1. [Fork](https://help.github.com/articles/fork-a-repo) the repository on Github
2. Create a named feature branch (like `add_package_x_support`)
3. Write your change ([see next section below](https://github.com/rstudio/shinyapps-package-dependencies/blob/master/CONTRIBUTING.md#how-to-add-system-dependency-support-for-an-r-package))
4. Write tests for your change ([see next section below](https://github.com/rstudio/shinyapps-package-dependencies/blob/master/CONTRIBUTING.md#how-to-add-system-dependency-support-for-an-r-package))
3. Write your change ([see next section below](https://github.com/rstudio/shinyapps-package-dependencies/blob/main/CONTRIBUTING.md#how-to-add-system-dependency-support-for-an-r-package))
4. Write tests for your change ([see next section below](https://github.com/rstudio/shinyapps-package-dependencies/blob/main/CONTRIBUTING.md#how-to-add-system-dependency-support-for-an-r-package))
5. Run the tests, ensuring they all pass
6. Submit a [Pull Request](https://help.github.com/articles/creating-a-pull-request) using Github

Expand Down
1 change: 0 additions & 1 deletion Dockerfile.focal
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ubuntu:focal
MAINTAINER RStudio Docker <[email protected]>

# update apt & install packages
RUN apt-get update -qq && \
Expand Down
126 changes: 126 additions & 0 deletions Dockerfile.jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
FROM ubuntu:jammy

# Configure apt-get to use the mirror in us-east-1 instead of the Docker default of archive.ubuntu.com
RUN sed -i "s/archive.ubuntu.com/us-east-1.ec2.archive.ubuntu.com/g" /etc/apt/sources.list

# update apt & install packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
curl \
git \
gnupg \
libboost-all-dev \
libcurl4-openssl-dev \
locales \
lsb-release \
openssh-client \
protobuf-compiler \
sudo && \
rm -rf /var/lib/apt/lists/*

# add R apt repository
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x51716619e084dab9 && \
echo "deb http://cran.rstudio.com/bin/linux/ubuntu jammy-cran40/" >> /etc/apt/sources.list.d/cran-rstudio.list

# Ensure FreeTDS is added to unixodbc upon installation
RUN echo tdsodbc freetds/addtoodbc boolean true | debconf-set-selections

# Install libraries & database related packages separately to break up the layers
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
gdebi-core \
jags \
libaio1 \
libatlas3-base \
libcairo2 \
libcairo2-dev \
libev-dev \
libfftw3-dev \
libgdal-dev \
libgraphviz-dev \
libgsl0-dev \
libmagick++-dev \
libmysqlclient21 \
libmysqlclient-dev \
libnetcdf-dev \
libpcre2-dev \
libprocps-dev \
libproj-dev \
libprotoc-dev \
libquantlib0-dev \
libsasl2-dev \
libssh-dev \
libsqliteodbc \
libxml2-dev \
libxt-dev \
libxt6 \
odbc-postgresql \
tdsodbc \
unixodbc \
unixodbc-dev \
wget \
zip && \
rm -rf /var/lib/apt/lists/*

# Install the RStudio Professional Drivers (includes mysql drivers)
RUN wget -q https://cdn.rstudio.com/drivers/7C152C12/installer/rstudio-drivers_2023.05.0_amd64.deb && \
gdebi -n rstudio-drivers_2023.05.0_amd64.deb && \
cat /opt/rstudio-drivers/odbcinst.ini.sample >> /etc/odbcinst.ini && \
rm rstudio-drivers_2023.05.0_amd64.deb

# Install JDK and Cargo separately to avoid the recommended packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openjdk-11-jdk cargo && \
rm -rf /var/lib/apt/lists/*

RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-dev \
python3-pip \
python3-venv \
python3-virtualenv && \
rm -rf /var/lib/apt/lists/*

# Install Julia
RUN wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.1-linux-x86_64.tar.gz && \
tar -C /usr/local -zxf julia-1.9.1-linux-x86_64.tar.gz && \
ln -s /usr/local/julia-1.9.1/bin/julia /usr/local/bin/julia && \
rm julia-1.9.1-linux-x86_64.tar.gz

# Install of texlive. Use --no-install-recommends to avoid installing ~750MB of documentation
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
texlive-full && \
rm -rf /var/lib/apt/lists/*


# add in the less secure openssl config file
# End-user applications can optionally reference this file to allow connection to less secure systems.
# https://community.rstudio.com/t/rmysql-to-mysql-database-on-aws-ssl-connection-error-after-deploying/100676
COPY insecure-openssl.cnf /etc/ssl/insecure-openssl.cnf

RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive TZ='Etc/UTC' apt-get install tzdata && \
apt-get install -s r-base-core r-base-dev | sed -e "/The following additional packages will be installed/,/^\w/!d;//d" -e "s/\br-.*\b//g" | xargs apt-get install -y

# set default locale
RUN update-locale --reset LANG=C.UTF-8

# set a non-default global location for Renviron.site.
# This would typically be found at $R_HOME/etc/Renviron.site, but we'd like it not to be a layer in the per-R version images.
# https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html
ENV R_ENVIRON /etc/R/Renviron.site
COPY Renviron.site /etc/R/Renviron.site

ARG R_VERSION=4.3.1

# Install R
RUN wget -q https://cdn.rstudio.com/r/ubuntu-2204/R-${R_VERSION}-ubuntu-2204.tar.gz -O /tmp/R-${R_VERSION}.tar.gz && \
mkdir -p /opt/R && \
tar zx -C /opt/R -f /tmp/R-${R_VERSION}.tar.gz && \
ln -s /opt/R/${R_VERSION}/bin/R /usr/bin/R && \
ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/bin/Rscript && \
ln -s /opt/R/${R_VERSION}/lib/R /usr/lib/R && \
rm /tmp/R-${R_VERSION}.tar.gz
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
PACKAGE_DIRS := $(wildcard packages/*)
PACKAGES := $(notdir ${PACKAGE_DIRS})
PACKAGE_TESTS := $(PACKAGES:%=test-%)
R_VERSION := 4.2.2
R_VERSION := 4.3.1

# Docker image is built on Docker Hub https://hub.docker.com/repository/docker/rstudio/shinyapps-package-dependencies/
docker-build-%:
docker build -t rstudio/shinyapps-package-dependencies:$* --build-arg R_VERSION=$(R_VERSION) -f Dockerfile.$* .

test-xenial-%:
docker run --rm --name spd-xenial-$* -v $(CURDIR):/shinyapps rstudio/shinyapps-package-dependencies:xenial /shinyapps/test $*

test-all-xenial:
docker run --rm --name spd-xenial -v $(CURDIR):/shinyapps rstudio/shinyapps-package-dependencies:xenial /shinyapps/test

test-focal-%:
docker run --rm --name spd-focal-$* -v $(CURDIR):/shinyapps rstudio/shinyapps-package-dependencies:focal /shinyapps/test $*

test-all-focal:
docker run --rm --name spd-focal -v $(CURDIR):/shinyapps rstudio/shinyapps-package-dependencies:focal /shinyapps/test

test-all: test-all-focal test-all-xenial
test-jammy-%:
docker run --rm --name spd-jammy-$* -v $(CURDIR):/shinyapps rstudio/shinyapps-package-dependencies:jammy /shinyapps/test $*

test-all-jammy:
docker run --rm --name spd-jammy -v $(CURDIR):/shinyapps rstudio/shinyapps-package-dependencies:jammy /shinyapps/test


test-all: test-all-focal test-all-jammy

.PHONY: test-all-focal test-all-xenial
.PHONY: test-all-focal test-all-jammy
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Some R packages require other software and libraries to be installed on the host
function. This repository is used in [shinyapps.io](https://www.shinyapps.io/) to install those dependencies if a
user's shinyapp utilizes an R package that requires other libraries/software to be install.

To contribute to this repository, read [CONTRIBUTING.md](https://github.com/rstudio/shinyapps-package-dependencies/blob/master/CONTRIBUTING.md)
To contribute to this repository, read [CONTRIBUTING.md](https://github.com/rstudio/shinyapps-package-dependencies/blob/main/CONTRIBUTING.md)

If you'd like to request the addition of support of a specific R package, [open a github issue](https://github.com/rstudio/shinyapps-package-dependencies/issues).

Expand Down
4 changes: 4 additions & 0 deletions Renviron.site
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
LANG=C.UTF-8

# Otherwise timedatectl will get called which leads to 'no systemd' inside Docker
TZ=UTC
Loading

0 comments on commit 4e85e45

Please sign in to comment.