-
Notifications
You must be signed in to change notification settings - Fork 2
/
geocdl.def
31 lines (22 loc) · 938 Bytes
/
geocdl.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
Bootstrap: docker
From: ubuntu:22.04
%files
requirements.txt /geocdl/
bin/geocdl.sh /geocdl/
%post
apt-get update
apt-get install -y python3 python-is-python3 python3-pip
apt-get install -y python3-gdal libgdal-dev
# Don't install pydap from pypi because the latest release is not available
# there (as of 2022-08-24). Instead, comment it out in requirements.txt and
# install directly from the release archive.
sed -i 's/pydap/#pydap/g' /geocdl/requirements.txt
# Don't install rasterio from the binaries on pypi because they have a
# minimal gdal that lacks HDF5 or HDF4 support. Instead, build rasterio from
# source to ensure we have HDF4/5 support.
python -m pip install -r /geocdl/requirements.txt --no-binary rasterio
python -m pip install https://github.com/pydap/pydap/archive/refs/tags/3.3.0.tar.gz
chmod ugo+x /geocdl/geocdl.sh
%runscript
cd /geocdl/src
exec /geocdl/geocdl.sh "$@"