diff --git a/Makefile b/Makefile index 9eaaf02..2e28140 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PLATFORMS := ubuntu-1804 ubuntu-2004 ubuntu-2204 debian-9 debian-10 debian-11 centos-7 centos-8 opensuse-153 +PLATFORMS := ubuntu-1804 ubuntu-2004 ubuntu-2204 debian-10 debian-11 centos-7 centos-8 opensuse-153 SLS_BINARY ?= ./node_modules/serverless/bin/serverless deps: diff --git a/README.md b/README.md index a4d9957..d6bf989 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ bug, or ask questions on [RStudio Community](https://community.rstudio.com). R binaries are built for the following Linux operating systems: - Ubuntu 18.04, 20.04, 22.04 -- Debian 9, 10, 11 +- Debian 10, 11 - CentOS 7 - Red Hat Enterprise Linux 7, 8 - openSUSE 15.3 @@ -48,7 +48,7 @@ bash -c "$(curl -L https://rstd.io/r-install)" Define the version of R that you want to install. Available versions of R can be found here: https://cdn.rstudio.com/r/versions.json ```bash -R_VERSION=3.5.3 +R_VERSION=4.1.3 ``` ### Download and install R @@ -65,9 +65,6 @@ wget https://cdn.rstudio.com/r/ubuntu-2004/pkgs/r-${R_VERSION}_1_amd64.deb # Ubuntu 22.04 wget https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION}_1_amd64.deb -# Debian 9 -wget https://cdn.rstudio.com/r/debian-9/pkgs/r-${R_VERSION}_1_amd64.deb - # Debian 10 wget https://cdn.rstudio.com/r/debian-10/pkgs/r-${R_VERSION}_1_amd64.deb @@ -185,8 +182,8 @@ environment: - LOCAL_STORE=/tmp/output # ensures that output tarballs are persisted locally build: context: . - dockerfile: Dockerfile.debian-9 -image: r-builds:debian-9 + dockerfile: Dockerfile.debian-11 +image: r-builds:debian-11 volumes: - ./integration/tmp:/tmp/output # path to output tarballs ``` @@ -196,7 +193,7 @@ volumes: IN `serverless-resources.yml` you'll need to add a job definition that points to the ECR image. ``` -rBuildsBatchJobDefinitionDebian9: +rBuildsBatchJobDefinitionDebian11: Type: AWS::Batch::JobDefinition Properties: Type: container @@ -207,7 +204,7 @@ rBuildsBatchJobDefinitionDebian9: Memory: 4096 JobRoleArn: "Fn::GetAtt": [ rBuildsEcsTaskIamRole, Arn ] - Image: #{AWS::AccountId}.dkr.ecr.#{AWS::Region}.amazonaws.com/r-builds:debian-9 + Image: #{AWS::AccountId}.dkr.ecr.#{AWS::Region}.amazonaws.com/r-builds:debian-11 ``` ### Environment variables in the serverless.yml functions. @@ -220,9 +217,9 @@ The serverless functions which trigger R builds need to be informed of new platf ``` environment: # snip - JOB_DEFINITION_ARN_debian_9: - Ref: rBuildsBatchJobDefinitionDebian9 - SUPPORTED_PLATFORMS: ubuntu-1804,debian-9,debian-10,centos-7,centos-8 + JOB_DEFINITION_ARN_debian_11: + Ref: rBuildsBatchJobDefinitionDebian11 + SUPPORTED_PLATFORMS: ubuntu-1804,debian-10,centos-7,centos-8 ``` ### Makefile diff --git a/builder/Dockerfile.debian-9 b/builder/Dockerfile.debian-9 deleted file mode 100644 index 4325a67..0000000 --- a/builder/Dockerfile.debian-9 +++ /dev/null @@ -1,25 +0,0 @@ -FROM debian:stretch - -ENV OS_IDENTIFIER debian-9 - -RUN set -x \ - && export DEBIAN_FRONTEND=noninteractive \ - && echo 'deb-src http://deb.debian.org/debian stretch main' >> /etc/apt/sources.list \ - && apt-get update \ - && apt-get install -y gcc libcurl4-openssl-dev libicu-dev \ - libopenblas-base libpcre2-dev make python-pip ruby ruby-dev wget \ - && apt-get build-dep -y r-base - -RUN pip install awscli - -RUN chmod 0777 /opt - -# Pin fpm to avoid git dependency in 1.12.0 -RUN gem install fpm:1.11.0 - -# Override the default pager used by R -ENV PAGER /usr/bin/pager - -COPY package.debian-9 /package.sh -COPY build.sh . -ENTRYPOINT ./build.sh diff --git a/builder/docker-compose.yml b/builder/docker-compose.yml index 6c36898..9eed916 100644 --- a/builder/docker-compose.yml +++ b/builder/docker-compose.yml @@ -34,17 +34,6 @@ services: image: r-builds:ubuntu-2204 volumes: - ./integration/tmp:/tmp/output - debian-9: - command: ./build.sh - environment: - - R_VERSION=${R_VERSION} - - LOCAL_STORE=/tmp/output - build: - context: . - dockerfile: Dockerfile.debian-9 - image: r-builds:debian-9 - volumes: - - ./integration/tmp:/tmp/output debian-10: command: ./build.sh environment: diff --git a/builder/package.debian-9 b/builder/package.debian-9 deleted file mode 100644 index 508a15d..0000000 --- a/builder/package.debian-9 +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -if [[ ! -d /tmp/output/debian-9 ]]; then - mkdir -p /tmp/output/debian-9 -fi - -# R 3.x requires PCRE1 -pcre_lib='libpcre2-dev' -if [[ "${R_VERSION}" =~ ^3 ]]; then - pcre_lib='libpcre3-dev' -fi - -fpm \ - -s dir \ - -t deb \ - -v 1 \ - -n R-${R_VERSION} \ - --vendor "RStudio, PBC" \ - --deb-priority "optional" \ - --deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \ - --url "http://www.r-project.org/" \ - --description "GNU R statistical computation and graphics system" \ - --maintainer "RStudio, PBC https://github.com/rstudio/r-builds" \ - --license "GPL-2" \ - -p /tmp/output/debian-9/ \ - -d ca-certificates \ - -d g++ \ - -d gcc \ - -d gfortran \ - -d libbz2-dev \ - -d libc6 \ - -d libcairo2 \ - -d libcurl4-openssl-dev \ - -d libglib2.0-0 \ - -d libgomp1 \ - -d libicu-dev \ - -d liblzma-dev \ - -d libopenblas-dev \ - -d libpango-1.0-0 \ - -d libpangocairo-1.0-0 \ - -d libpaper-utils \ - -d ${pcre_lib} \ - -d libpng16-16 \ - -d libreadline7 \ - -d libtcl8.6 \ - -d libtiff5 \ - -d libtk8.6 \ - -d libx11-6 \ - -d libxt6 \ - -d make \ - -d ucf \ - -d unzip \ - -d zip \ - -d zlib1g-dev \ - /opt/R/${R_VERSION} - -shopt -s extglob -export PKG_FILE=$(ls /tmp/output/debian-9/[rR]-${R_VERSION}*.@(deb|rpm) | head -1) - diff --git a/serverless-resources.yml b/serverless-resources.yml index 4b05aee..4318ed0 100644 --- a/serverless-resources.yml +++ b/serverless-resources.yml @@ -172,20 +172,6 @@ rBuildsBatchJobDefinitionUbuntu2204: Image: "#{AWS::AccountId}.dkr.ecr.#{AWS::Region}.amazonaws.com/r-builds:ubuntu-2204" Timeout: AttemptDurationSeconds: 7200 -rBuildsBatchJobDefinitionDebian9: - Type: AWS::Batch::JobDefinition - Properties: - Type: container - ContainerProperties: - Command: - - ./build.sh - Vcpus: 4 - Memory: 4096 - JobRoleArn: - "Fn::GetAtt": [ rBuildsEcsTaskIamRole, Arn ] - Image: "#{AWS::AccountId}.dkr.ecr.#{AWS::Region}.amazonaws.com/r-builds:debian-9" - Timeout: - AttemptDurationSeconds: 7200 rBuildsBatchJobDefinitionDebian10: Type: AWS::Batch::JobDefinition Properties: diff --git a/serverless.yml b/serverless.yml index d3846e0..8e618f8 100644 --- a/serverless.yml +++ b/serverless.yml @@ -41,8 +41,6 @@ provider: Ref: rBuildsBatchJobDefinitionUbuntu2004 JOB_DEFINITION_ARN_ubuntu_2204: Ref: rBuildsBatchJobDefinitionUbuntu2204 - JOB_DEFINITION_ARN_debian_9: - Ref: rBuildsBatchJobDefinitionDebian9 JOB_DEFINITION_ARN_debian_10: Ref: rBuildsBatchJobDefinitionDebian10 JOB_DEFINITION_ARN_debian_11: @@ -53,7 +51,7 @@ provider: Ref: rBuildsBatchJobDefinitionCentos8 JOB_DEFINITION_ARN_opensuse_153: Ref: rBuildsBatchJobDefinitionOpensuse153 - SUPPORTED_PLATFORMS: ubuntu-1804,ubuntu-2004,ubuntu-2204,debian-9,debian-10,debian-11,centos-7,centos-8,opensuse-153 + SUPPORTED_PLATFORMS: ubuntu-1804,ubuntu-2004,ubuntu-2204,debian-10,debian-11,centos-7,centos-8,opensuse-153 functions: queueBuilds: