-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Replace three Dockerfiles with one
- Loading branch information
1 parent
5710a0b
commit 46d2039
Showing
5 changed files
with
106 additions
and
32 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,63 @@ | ||
FROM ghcr.io/osgeo/gdal:ubuntu-full-3.8.5 | ||
LABEL desc="Docker image with ALL THE THINGS for use in Batch by the GFW data API" | ||
LABEL version="v1.0" | ||
|
||
ENV TIPPECANOE_VERSION=2.56.0 | ||
|
||
ENV VENV_DIR="/.venv" | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install --no-install-recommends -y python3-dev python3-venv \ | ||
postgresql-client jq curl libsqlite3-dev zlib1g-dev zip libpq-dev build-essential gcc g++ \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -s /usr/include /usr/include/gdal | ||
|
||
# --system-site-packages is needed to copy the GDAL Python libs into the venv | ||
RUN python -m venv ${VENV_DIR} --system-site-packages \ | ||
&& . ${VENV_DIR}/bin/activate \ | ||
&& python -m ensurepip --upgrade \ | ||
&& python -m pip install \ | ||
agate~=1.11.0 \ | ||
asyncpg~=0.29.0 \ | ||
awscli~=1.33.13 \ | ||
awscli-plugin-endpoint~=0.4 \ | ||
boto3~=1.34.128 \ | ||
click~=8.1.7 \ | ||
csvkit~=2.0.0 \ | ||
earthengine-api~=0.1.408 \ | ||
fiona~=1.9.6 \ | ||
numpy~=1.26.4 \ | ||
pandas~=2.1.4 \ | ||
psycopg2~=2.9.9 \ | ||
rasterio~=1.3.10 \ | ||
setuptools~=70.1 \ | ||
shapely~=2.0.4 \ | ||
SQLAlchemy~=1.3.24 \ | ||
tileputty~=0.2.10 | ||
|
||
# Install TippeCanoe | ||
RUN mkdir -p /opt/src | ||
WORKDIR /opt/src | ||
RUN curl https://codeload.github.com/felt/tippecanoe/tar.gz/${TIPPECANOE_VERSION} | tar -xz \ | ||
&& cd /opt/src/tippecanoe-${TIPPECANOE_VERSION} \ | ||
&& make \ | ||
&& make install \ | ||
&& rm -R /opt/src/tippecanoe-${TIPPECANOE_VERSION} | ||
|
||
# Copy scripts | ||
COPY ./batch/scripts/ /opt/scripts/ | ||
COPY ./batch/python/ /opt/python/ | ||
|
||
# Make sure scripts are executable | ||
RUN chmod +x -R /opt/scripts/ | ||
RUN chmod +x -R /opt/python/ | ||
|
||
ENV PATH="/opt/scripts:${PATH}" | ||
ENV PATH="/opt/python:${PATH}" | ||
|
||
ENV WORKDIR="/tmp" | ||
WORKDIR /tmp | ||
|
||
ENTRYPOINT ["/opt/scripts/report_status.sh"] |
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
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
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
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