start building docker images
This commit is contained in:
parent
fe99870a94
commit
7b9cf84ebc
1 changed files with 61 additions and 26 deletions
|
|
@ -6,17 +6,27 @@ PLATFORM_ID=$(cat /etc/os-release | grep 'PLATFORM_ID=' | cut -d'=' -f2 | tr -d
|
|||
|
||||
if [ $PLATFORM_ID = "platform:el9" ]; then
|
||||
|
||||
subscription-manager register --username pat-s --password $RED_HAT_DEV_PW
|
||||
subscription-manager register --username pat-s --password $RED_HAT_DEV_PW
|
||||
|
||||
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
|
||||
dnf -y install git rsync
|
||||
# dnf update -y
|
||||
# FIXME: protect PW
|
||||
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
|
||||
dnf -y install git rsync
|
||||
|
||||
echo "R Version: ${R_VERSION}"
|
||||
echo "Downloading R-${R_VERSION}.rpm from S3..."
|
||||
curl -o /tmp/R-${R_VERSION}.rpm https://cynkra-r-builds-arm64.s3.eu-central-1.amazonaws.com/el9/R-"${R_VERSION}"-1-1."$(arch)".rpm
|
||||
dnf install -y /tmp/R-${R_VERSION}.rpm
|
||||
echo "R Version: ${R_VERSION}"
|
||||
echo "Downloading R-${R_VERSION}.rpm from S3..."
|
||||
curl -o /tmp/R-${R_VERSION}.rpm https://cynkra-r-builds-arm64.s3.eu-central-1.amazonaws.com/el9/R-"${R_VERSION}"-1-1."$(arch)".rpm
|
||||
dnf install -y /tmp/R-${R_VERSION}.rpm
|
||||
|
||||
elif [ $PLATFORM_ID = "platform:el8" ]; then
|
||||
|
||||
subscription-manager register --username pat-s --password $RED_HAT_DEV_PW
|
||||
|
||||
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
|
||||
|
||||
dnf -y install git rsync
|
||||
echo "R Version: ${R_VERSION}"
|
||||
echo "Downloading R-${R_VERSION}.rpm from S3..."
|
||||
curl -o /tmp/R-${R_VERSION}.rpm https://cynkra-r-builds-arm64.s3.eu-central-1.amazonaws.com/el8/R-"${R_VERSION}"-1-1."$(arch)".rpm
|
||||
dnf install -y /tmp/R-${R_VERSION}.rpm
|
||||
fi
|
||||
|
||||
export PATH=/opt/R/${R_VERSION}/bin:$PATH
|
||||
|
|
@ -24,15 +34,15 @@ export PATH=/opt/R/${R_VERSION}/bin:$PATH
|
|||
### install R packages needed for building
|
||||
|
||||
R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
|
||||
R -q -e 'options(repos = c(CRAN="https://stat.ethz.ch/CRAN/")); pak::pak(c("pkgbuild", "cranlike", "drat"))'
|
||||
R -q -e 'options(repos = c(CRAN="https://stat.ethz.ch/CRAN/")); pak::pak(c("pkgbuild", "cranlike"))'
|
||||
|
||||
### install awscli
|
||||
curl -s "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
|
||||
unzip -qq awscliv2.zip
|
||||
./aws/install
|
||||
rm -rf awscliv2.zip
|
||||
# curl -s "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
|
||||
# unzip -qq awscliv2.zip
|
||||
# ./aws/install
|
||||
# rm -rf awscliv2.zip
|
||||
|
||||
mkdir /root/.aws
|
||||
echo -e "[default]\n
|
||||
aws_access_key_id=AKIATHTKSC6FRVE5LNE7\n
|
||||
aws_secret_access_key=KCsGZCWEdz8BlVdTqmFG04/UiM41ETgaQnOTL0mm\n" >/root/.aws/credentials
|
||||
# mkdir /root/.aws
|
||||
# echo -e "[default]\n
|
||||
# aws_access_key_id=AKIATHTKSC6FRVE5LNE7\n
|
||||
# aws_secret_access_key=KCsGZCWEdz8BlVdTqmFG04/UiM41ETgaQnOTL0mm\n" >/root/.aws/credentials
|
||||
|
|
|
|||
Loading…
Reference in a new issue