-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker files to test with gdal34 and gdal36
- Loading branch information
1 parent
cd4f74e
commit fb28fea
Showing
3 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Use Debian Bookworm as the base image | ||
FROM ubuntu:22.04 | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install system packages using apt | ||
RUN apt-get update && \ | ||
apt-get install --yes \ | ||
--no-install-recommends \ | ||
libgdal-dev \ | ||
sqlite3 \ | ||
libsqlite3-mod-spatialite \ | ||
python3 \ | ||
python3-pip \ | ||
python3-dev \ | ||
build-essential \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
cmake \ | ||
gfortran \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# Set GDAL environment variables | ||
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal | ||
ENV C_INCLUDE_PATH=/usr/include/gdal | ||
|
||
# Upgrade pip to the latest version | ||
RUN python3 -m pip install pygdal==3.4.1.* | ||
RUN python3 -m pip install --upgrade pip setuptools==63.* wheel scikit-build numpy==1.24.* cython | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy your application code into the container | ||
COPY . /app | ||
|
||
# Install the local Python package | ||
RUN python3 setup.py develop clean | ||
RUN python3 -m pip install -e .[test,gridadmin] --no-build-isolation pygdal==3.4.1.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Use Debian Bookworm as the base image | ||
FROM ubuntu:22.04 as build | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Install system packages using apt | ||
RUN apt-get update && \ | ||
apt-get install --yes \ | ||
--no-install-recommends \ | ||
sqlite3 \ | ||
libsqlite3-mod-spatialite \ | ||
python3 \ | ||
python3-pip \ | ||
python3-dev \ | ||
build-essential \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
cmake \ | ||
gfortran \ | ||
software-properties-common \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install gnupg and dirmngr | ||
RUN apt-get update && \ | ||
apt-get install -y gnupg dirmngr && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
RUN add-apt-repository "ppa:ubuntugis/ppa" -y && \ | ||
apt update && \ | ||
apt install -y libgdal-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# Set GDAL environment variables | ||
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal | ||
ENV C_INCLUDE_PATH=/usr/include/gdal | ||
|
||
# Upgrade pip to the latest version | ||
RUN python3 -m pip install pygdal==3.6.4.* | ||
RUN python3 -m pip install --upgrade pip setuptools==63.* wheel scikit-build numpy==1.24.* cython | ||
|
||
|
||
FROM build | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy your application code into the container | ||
COPY . /app | ||
|
||
# Install the local Python package | ||
RUN python3 setup.py develop clean | ||
RUN python3 -m pip install -e .[test,gridadmin] --no-build-isolation pygdal==3.6.4.* | ||
|
||
CMD ["python3", "-m", "pytest"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: '1' | ||
services: | ||
gdal34-test: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile_gdal34 | ||
image: gdal34 | ||
container_name: gdal34 | ||
entrypoint: pytest | ||
gdal36-test: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile_gdal36 | ||
image: gdal36 | ||
container_name: gdal36 | ||
entrypoint: pytest | ||
gdal34-create-data: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile_gdal34 | ||
image: gdal34 | ||
container_name: gdal34 | ||
volumes: | ||
- ./data:/data | ||
entrypoint: python3 /app/make_data.py /data/gdal34 | ||
gdal36-create-data: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile_gdal36 | ||
image: gdal36 | ||
container_name: gdal36 | ||
volumes: | ||
- ./data:/data | ||
entrypoint: python3 /app/make_data.py /data/gdal36 |