-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathatlantisvm_Ubuntu20
144 lines (119 loc) · 4.53 KB
/
atlantisvm_Ubuntu20
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
echo "This script expects Ubuntu Server 20.04.2 LTS (Focal Fossa)"
echo "Will install all dependencies, libraries, Rstudio and needed packages to run Atlantis and analyze output"
sudo timedatectl set-timezone America/Los_Angeles
sudo apt-get update -y
sudo apt-get dist-upgrade -y
sudo apt-get -y --no-install-recommends install \
autoconf \
automake \
build-essential \
libcurl4 \
libcurl4-openssl-dev \
curl \
cargo \
gdal-bin \
flip \
libcairo2 \
libavfilter-dev \
libharfbuzz-dev \
libfribidi-dev \
libcairo-5c0 \
libapparmor1 \
libhdf5-dev \
libnetcdf-dev \
libudunits2-dev \
libxml2-dev \
libssl-dev \
libv4l-0 \
libgeotiff5 \
libglu1-mesa-dev \
libpoppler-cpp-dev \
libprotobuf-dev \
librsvg2-dev \
libx11-dev \
lsscsi \
openjdk-8-jdk \
python2 \
proj-data \
protobuf-compiler \
htop \
openssl \
rpm \
mesa-common-dev \
netcdf-bin \
ntp \
ntpdate \
texlive-latex-extra \
nco \
cdo \
unzip \
gfortran
#use this to install Proj4 which is required for Atlantis
#https://gist.github.com/robinkraft/2a8ee4dd7e9ee9126030
#http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#PROJ4
#uninstall proj-bin libproj-dev if present
#look for proj with locate libproj.so
# sudo apt install mlocate
sudo apt-get install -y subversion make
cd /tmp
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/ --non-interactive --trust-server-cert-failures unknown-ca,cn-mismatch,expired,not-yet-valid,other
cd /tmp/proj/nad
sudo wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
unzip -o -q proj-datumgrid-1.5.zip
#make distclean
cd /tmp/proj/
./configure && make && sudo make install && sudo ldconfig
#these might be needed to install spatial R programs but can conflict with Atlantis proj4
#https://github.com/r-spatial/sf#multiple-gdal-geos-andor-proj-versions-on-your-system
#https://stackoverflow.com/questions/60759865/error-when-installing-sf-in-r-double-free-or-corruption
#to remove a respository https://askubuntu.com/questions/866901/what-can-i-do-if-a-repository-ppa-does-not-have-a-release-file
#sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
#sudo apt-get update -y
#sudo apt-get upgrade -y
#sudo apt-get dist-upgrade -y
#sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev -y
#sudo add-apt-repository -y ppa:opencpu/jq
#sudo apt-get update -qq
#sudo apt-get install libjq-dev -y
sudo apt-get -f install -y # missing dependencies
sudo apt autoremove -y #unused packages
echo "Install R"
#http://cran.rstudio.com/bin/linux/ubuntu/
# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt install --no-install-recommends r-base -y
sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+ -y
echo "Install R studio"
sudo apt-get install gdebi-core -y
wget https://download2.rstudio.org/server/focal/amd64/rstudio-server-2023.12.1-402-amd64.deb
sudo gdebi --n rstudio-server-2023.12.1-402-amd64.deb
echo "Install AzCopy"
#to uninstall azcopy use https://github.com/MicrosoftDocs/azure-docs/issues/18771
wget -O azcopy_linux_amd64_10.20.1.tar https://aka.ms/downloadazcopy-v10-linux
tar -xzf azcopy_linux_amd64_10.20.1.tar
sudo cp ./azcopy_linux_amd64_*/azcopy /usr/bin/
echo "Install AzCLI"
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
sudo apt-get update
sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
sudo mkdir -p /etc/apt/keyrings
curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
gpg --dearmor |
sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" |
sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-get update
if [ -d $HOME/bin ]; then
PATH=$PATH:$HOME/bin
fi