-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #562 from s22s/feature/pyspark-3.1
Python binding updates for PySpark 3.1
- Loading branch information
Showing
32 changed files
with
519 additions
and
349 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,3 @@ | ||
* | ||
!requirements-conda.txt | ||
!fix-permissions |
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 |
---|---|---|
@@ -1,63 +1,35 @@ | ||
FROM circleci/openjdk:8-jdk | ||
|
||
ENV MINICONDA_VERSION=4.8.2 \ | ||
MINICONDA_MD5=87e77f097f6ebb5127c77662dfc3165e \ | ||
CONDA_VERSION=4.8.2 \ | ||
CONDA_DIR=/opt/conda \ | ||
PYTHON_VERSION=3.7.7 | ||
FROM circleci/openjdk:11-jdk | ||
#LABEL org.opencontainers.image.source=https://github.com/locationtech/rasterframes | ||
|
||
USER root | ||
|
||
ENV PATH=$CONDA_DIR/bin:$PATH | ||
|
||
# circleci is 3434 | ||
COPY --chown=3434:3434 fix-permissions /tmp | ||
|
||
# See: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -yq --no-install-recommends \ | ||
sudo \ | ||
wget \ | ||
bzip2 \ | ||
file \ | ||
libtinfo5 \ | ||
ca-certificates \ | ||
gettext-base \ | ||
locales && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
curl -s https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \ | ||
install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \ | ||
gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \ | ||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list | ||
|
||
RUN \ | ||
cd /tmp && \ | ||
mkdir -p $CONDA_DIR && \ | ||
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \ | ||
echo "${MINICONDA_MD5} *Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - && \ | ||
/bin/bash Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \ | ||
rm Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \ | ||
conda config --system --set auto_update_conda false && \ | ||
conda config --system --set show_channel_urls true && \ | ||
conda config --system --set channel_priority strict && \ | ||
if [ ! $PYTHON_VERSION = 'default' ]; then conda install --yes python=$PYTHON_VERSION; fi && \ | ||
conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \ | ||
conda install --quiet --yes conda && \ | ||
conda install --quiet --yes pip && \ | ||
pip config set global.progress_bar off && \ | ||
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \ | ||
conda clean --all --force-pkgs-dirs --yes --quiet && \ | ||
sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null | ||
apt-get update && \ | ||
apt-get install -yq --no-install-recommends conda && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY requirements-conda.txt /tmp/ | ||
ENV CONDA_DIR=/opt/conda | ||
ENV PATH=$CONDA_DIR/bin:$PATH | ||
|
||
COPY requirements-conda.txt fix-permissions /tmp | ||
RUN \ | ||
conda install --channel conda-forge --no-channel-priority --freeze-installed \ | ||
--file /tmp/requirements-conda.txt && \ | ||
conda install --quiet --yes --channel=conda-forge --file=/tmp/requirements-conda.txt && \ | ||
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \ | ||
ldconfig && \ | ||
conda clean --all --force-pkgs-dirs --yes --quiet && \ | ||
sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null && \ | ||
ldconfig 2> /dev/null | ||
sh /tmp/fix-permissions $CONDA_DIR | ||
|
||
|
||
# Work-around for pyproj issue https://github.com/pyproj4/pyproj/issues/415 | ||
ENV PROJ_LIB=/opt/conda/share/proj | ||
|
||
USER 3434 | ||
|
||
WORKDIR /home/circleci |
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 |
---|---|---|
@@ -1,19 +1,27 @@ | ||
IMAGE_NAME=miniconda-gdal | ||
VERSION=latest | ||
HOST=docker.pkg.github.com | ||
REPO=${HOST}/locationtech/rasterframes | ||
FULL_NAME=${REPO}/${IMAGE_NAME}:${VERSION} | ||
IMAGE_NAME=circleci-openjdk-conda-gdal | ||
SHA=$(shell git log -n1 --format=format:"%H" | cut -c 1-7) | ||
VERSION?=$(SHA) | ||
HOST=docker.io | ||
REPO=$(HOST)/s22s | ||
FULL_NAME=$(REPO)/$(IMAGE_NAME):$(VERSION) | ||
|
||
all: build login push | ||
.DEFAULT_GOAL := help | ||
help: | ||
# http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
@echo "Usage: make [target]" | ||
@echo "Targets: " | ||
@grep -E '^[a-zA-Z0-9_%/-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\t\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
|
||
build: | ||
all: build push ## Build and then push image | ||
|
||
build: ## Build the docker image | ||
docker build . -t ${FULL_NAME} | ||
|
||
login: | ||
docker login ${HOST} | ||
login: ## Login to the docker registry | ||
docker login | ||
|
||
push: | ||
push: login ## Push docker image to registry | ||
docker push ${FULL_NAME} | ||
|
||
shell: build | ||
run: build ## Build image and launch shell | ||
docker run --rm -it ${FULL_NAME} bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
gdal==2.4.4 | ||
python==3.8 | ||
gdal==3.1.2 | ||
libspatialindex | ||
rasterio[s3] | ||
rtree |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 3.0.3 | ||
version = 3.0.4 | ||
runner.dialect = scala212 | ||
indent.main = 2 | ||
indent.significant = 2 | ||
|
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
20 changes: 20 additions & 0 deletions
20
core/src/main/scala/org/locationtech/rasterframes/ref/Subgrid.scala
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
Oops, something went wrong.