This repository has been archived by the owner on Aug 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsingularity.build
104 lines (92 loc) · 2.56 KB
/
singularity.build
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
Bootstrap: docker
From: ubuntu:16.04
%help
Singularity image based on ubuntu 16.04 with spatial python software
https://github.com/tianon/docker-brew-ubuntu-core/blob/85822fe532df3854da30b4829c31878ac51bcb91/xenial/Dockerfile
Maintained by Christopher Anderson ([email protected]) @christobal54
%labels
Maintainer christobal54
Version UserEror
%setup
# set the default directory for storing configuration files
mkdir $SINGULARITY_ROOTFS/ccb
%environment
# set the path to the ipython configuration
# make sure you have a $CCB environment variable on your local machine to your ccb directory
export PYTHONPATH=$CCB:$PYTHONPATH
export IPYTHONDIR=$CCB/ipython
export PATH=$CCB/bin:$PATH
%post
# install packages via apt
apt-get update -y
apt-get upgrade -y
apt-get install -y \
python-gdal \
gdal-bin \
libgdal-dev \
ipython \
python-setuptools \
python-dev \
python-pip \
python-tk \
build-essential \
software-properties-common \
libfontconfig1 \
mesa-common-dev \
python-numpy \
python-scipy \
python-sklearn \
python-pandas \
python-geopandas \
python-matplotlib \
python-qt4 \
python-sip \
python-pyside \
gcc \
gfortran \
qt5.1 \
git \
vim \
openssl \
default-jdk \
unzip \
wget
# install the orfeo toolbox packages
apt-add-repository -y ppa:ubuntugis/ubuntugis-unstable
apt-get -y update
apt-get install -y otb-bin otb-bin-qt python-otb
# clean up the apt files
apt-get clean
rm -rf /var/lib/apt/lists/*
# install pip packages
pip install pip==9.0.1
pip install jupyter \
qtpy \
shapely \
Pyro4 \
psutil \
rtree \
qtawesome \
qtpy \
six \
taskgraph \
Pyro4 \
Py6S \
spectral \
pyprosail \
google-api-python-client \
pyCrypto \
pyOpenSSL>=0.11 \
earthengine-api
# get some fresh matplotlib
pip install --upgrade matplotlib oauth2client setuptools geopandas
# since pyprosail is broken on default, move some files around
mv /usr/local/lib/python2.7/dist-packages/PyPROSAIL/_prosail_model.so /usr/local/lib/python2.7/dist-packages/pyprosail/
# download the maxent binary
cd /ccb
wget https://biodiversityinformatics.amnh.org/open_source/maxent/maxent.php?op=download -O maxent.zip
unzip maxent.zip
rm maxent.bat maxent.sh maxent.zip
%runscript
echo "--- ccb-dev-container ---"
exec "$@"