-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile.dev
84 lines (74 loc) · 3.47 KB
/
Dockerfile.dev
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
FROM debian:bookworm-slim AS builder
RUN apt-get update && \
apt-get install -y git build-essential cmake ninja-build openssh-client \
swig python3-dev python3-doc python3-venv python3-pip doxygen \
curl zip unzip tar \
libglib2.0-dev \
libutfcpp-dev \
libproj-dev \
libgsf-1-dev \
libcurl4-openssl-dev \
libssl-dev \
zlib1g-dev \
libpulse-dev \
wget \
gdb
RUN pip install --break-system-packages \
sphinx==6.2.1 \
numpydoc \
breathe \
myst-parser \
sphinx-automodapi \
graphviz
# Install libxml2
RUN cd /tmp && \
wget https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.13.5/libxml2-v2.13.5.tar.gz && \
echo "37cdec8cd20af8ab0decfa2419b09b4337c2dbe9da5615d2a26f547449fecf2a libxml2-v2.13.5.tar.gz" > libxml2.sum && \
shasum -a 256 -c libxml2.sum && \
tar xf libxml2-v2.13.5.tar.gz && \
cd libxml2-v2.13.5 && \
cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DLIBXML2_WITH_ZLIB=ON -DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_PYTHON=OFF && \
cmake --build build --target install
# Install HDF5
RUN cd /tmp && \
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.5/hdf5-1.14.5.tar.gz && \
echo "ec2e13c52e60f9a01491bb3158cb3778c985697131fc6a342262d32a26e58e44 hdf5-1.14.5.tar.gz" > hdf5.sum && \
shasum -a 256 -c hdf5.sum && \
tar xf hdf5-1.14.5.tar.gz && \
cd hdf5-1.14.5 && \
cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DHDF5_BUILD_CPP_LIB=ON -DHDF5_BUILD_TOOLS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON \
-DHDF5_BUILD_HL_LIB:BOOL=ON -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON && \
cmake --build build --target install
# Install Catch2 version 3 (Debian only packages version 2)
RUN cd /tmp && \
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.6.0.tar.gz && \
echo "485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356 v3.6.0.tar.gz" > catch2.sum && \
shasum -a 256 -c catch2.sum && \
tar xf v3.6.0.tar.gz && \
cd Catch2-3.6.0 && \
cmake -B build -G Ninja -S . -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_TESTING:BOOL=OFF && \
cmake --build build --target install
# Install GDAL
RUN cd /tmp && \
wget https://github.com/OSGeo/gdal/releases/download/v3.9.3/gdal-3.9.3.tar.gz && \
echo "f293d8ccc6b98f617db88f8593eae37f7e4b32d49a615b2cba5ced12c7bebdae gdal-3.9.3.tar.gz" > gdal.sum && \
shasum -a 256 -c gdal.sum && \
tar xf gdal-3.9.3.tar.gz && \
cd gdal-3.9.3 && \
cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DBUILD_APPS=OFF -DBUILD_TESTING=OFF -DGDAL_ENABLE_DRIVER_BAG=ON \
-DGDAL_USE_PARQUET=OFF -DGDAL_USE_ARROW=OFF -DGDAL_USE_ARROWDATASET=OFF \
-DGDAL_ENABLE_HDF5_GLOBAL_LOCK:BOOL=ON -DBUILD_PYTHON_BINDINGS:BOOL=OFF -DBUILD_JAVA_BINDINGS:BOOL=OFF \
-DBUILD_CSHARP_BINDINGS:BOOL=OFF && \
cmake --build build --target install
RUN ldconfig
# Create Python venv and install dependencies
RUN python3 -m pip install --break-system-packages --upgrade pip && \
python3 -m pip install --break-system-packages setuptools 'setuptools-scm[toml]' wheel cmake-build-extension \
unittest-xml-reporting pytest pytest-cov pytest-xdist numpy && \
# Install GDAL after numpy is installed so that gdal_array bindings will be installed.
python3 -m pip install --break-system-packages 'GDAL==3.9.3'
WORKDIR /tmp/bag
ENTRYPOINT ["/bin/bash", "-c"]