-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathinstall-silicon.sh
113 lines (105 loc) · 2.2 KB
/
install-silicon.sh
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Install script for additional packages needed for Apple silicon chips that
# have to rely on rocker/rstudio image built with ARM64
# Adapted from scripts provided by rocker, e.g.
# https://github.com/rocker-org/rocker-versioned2/blob/master/scripts/\
# install_tidyverse.sh
#!/bin/bash
set -e
## build ARGs
NCPUS=${NCPUS:--1}
# a function to install apt packages only if they are not installed
function apt_install() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
apt-get update
fi
apt-get install -y --no-install-recommends "$@"
fi
}
apt_install \
libxml2-dev \
libcairo2-dev \
libgit2-dev \
default-libmysqlclient-dev \
libpq-dev \
libsasl2-dev \
libsqlite3-dev \
libssh2-1-dev \
libxtst6 \
libcurl4-openssl-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
unixodbc-dev \
gdal-bin \
lbzip2 \
libfftw3-dev \
libgdal-dev \
libgeos-dev \
libgsl0-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libhdf4-alt-dev \
libhdf5-dev \
libjq-dev \
libpq-dev \
libproj-dev \
libprotobuf-dev \
libnetcdf-dev \
libsqlite3-dev \
libssl-dev \
libudunits2-dev \
netcdf-bin \
postgis \
protobuf-compiler \
sqlite3 \
tk-dev \
unixodbc-dev
install2.r --error --skipmissing --skipinstalled -n "$NCPUS" \
tidyverse \
devtools \
rmarkdown \
RColorBrewer \
RandomFields \
RNetCDF \
classInt \
deldir \
gstat \
hdf5r \
mapdata \
maptools \
mapview \
ncdf4 \
proj4 \
raster \
rgdal \
rgeos \
rlas \
sf \
sp \
spacetime \
spatstat \
spatialreg \
spdep \
stars \
terra \
tidync \
tmap \
geoR \
geosphere \
rmapshaper \
patchwork \
kableExtra \
prettydoc \
cowplot \
here \
rmdformats
# Clean up
rm -rf /var/lib/apt/lists/*
rm -rf /tmp/downloaded_packages
## Strip binary installed lybraries from RSPM
## https://github.com/rocker-org/rocker-versioned2/issues/340
strip /usr/local/lib/R/site-library/*/libs/*.so