-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsingr.def
67 lines (58 loc) · 1.62 KB
/
singr.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
BootStrap: docker
From: ubuntu:jammy
%labels
Author cole.brokamp@gmail.com
R_VERSION 4.3.0
%runscript
/bin/bash
%environment
export R_VERSION=4.3.0
%post
export R_VERSION=4.3.0
export OS_IDENTIFIER=ubuntu-2204
# configure default locale
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export TZ=UTC
# install some build dependencies and other essentials
apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-transport-https \
curl \
fontconfig \
git \
libcurl4-openssl-dev \
locales \
libssl-dev \
perl \
sudo \
tzdata \
software-properties-common \
wget && \
rm -rf /var/lib/apt/lists/*
# install R
wget https://cdn.posit.co/r/${OS_IDENTIFIER}/pkgs/r-${R_VERSION}_1_amd64.deb && \
apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -f -y ./r-${R_VERSION}_1_amd64.deb && \
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 r-${R_VERSION}_1_amd64.deb && \
rm -rf /var/lib/apt/lists/*
# install geospatial system deps
add-apt-repository ppa:ubuntugis/ubuntugis-unstable
DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends \
libgdal-dev \
gdal-bin \
libgeos-dev \
libgeos++-dev \
libproj-dev \
libudunits2-dev
%test
R --version | grep -q "R version ${R_VERSION}"
if [ $? -eq 0 ]; then
echo "R version ${R_VERSION} is available."
else
echo "R not found."
fi