-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Almost) Universal batch job dockerfile #613
base: uv_at_last
Are you sure you want to change the base?
Changes from all commits
e17f8b2
de1d5fa
b864ec3
f57c827
7489662
be3fb39
e9e4d10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
FROM ghcr.io/osgeo/gdal:ubuntu-full-3.9.3 | ||
LABEL desc="Docker image with ALL THE THINGS for use in Batch by the GFW data API" | ||
LABEL version="v1.1" | ||
|
||
ENV TIPPECANOE_VERSION=2.72.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume it is intentional that you are upgrading tippecanoe so much from v1.3.1 to v2.72.0? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same situation as above. We were using v2.55.0: https://github.com/wri/gfw-dockerfiles/blob/master/data-api-tippecanoe.dockerfile#L5 |
||
|
||
ENV VENV_DIR="/.venv" | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install --no-install-recommends -y python3 python-dev-is-python3 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/* | ||
|
||
# --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.12.0 \ | ||
asyncpg~=0.30.0 \ | ||
awscli~=1.36.18 \ | ||
awscli-plugin-endpoint~=0.4 \ | ||
boto3~=1.35.77 \ | ||
click~=8.1.7 \ | ||
csvkit~=2.0.1 \ | ||
earthengine-api~=0.1.408 \ | ||
fiona~=1.9.6 \ | ||
gsutil~=5.31 \ | ||
numpy~=1.26.4 \ | ||
pandas~=2.1.4 \ | ||
psycopg2~=2.9.10 \ | ||
rasterio~=1.3.11 \ | ||
setuptools~=75.6 \ | ||
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="/" | ||
WORKDIR / | ||
|
||
ENTRYPOINT ["/opt/scripts/report_status.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a big jump from gdal v1.2.2 in the gdal-python.dockerfile to gdal v3.9.3? Are you sure there are no incompatibilities? I guess we just need to do a lot of testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no, that's just the (somewhat arbitrary) version of the dockerfile. v1.2.1 corresponds to GDAL v3.8.5 or so. So it's not that big a version bump. See here: https://github.com/wri/gfw-dockerfiles/blob/master/data-api-gdal.dockerfile#L1