Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now run in one go with scripts/benchmark And cleanup the order of operations in the Dockerfile - Move all package installation to beginning and run in one step for better layer caching - Move all external dependency additions before sbt and other ops to improve layer caching - Reorder ops so we don't have to modify WORKDIR a bunch
- Loading branch information
1 parent
3d1d5ea
commit 3a8b908
Showing
7 changed files
with
113 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
FROM ubuntu:trusty | ||
|
||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install -y software-properties-common \ | ||
&& add-apt-repository -y ppa:openjdk-r/ppa \ | ||
&& apt-get update \ | ||
&& deps=" \ | ||
unzip \ | ||
openjdk-8-jdk \ | ||
wget \ | ||
" \ | ||
&& apt-get install -y $deps --no-install-recommends \ | ||
&& update-ca-certificates -f \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ADD archives/imageio-ext-1.1.24-jars.zip /tmp | ||
ADD archives/gdal-data.zip /tmp | ||
ADD archives/libgdal-java_1.10.1+dfsg-5ubuntu1_amd64.deb /tmp/ | ||
|
||
COPY . /opt/geotrellis-contrib | ||
|
||
RUN set -ex \ | ||
&& unzip /tmp/imageio-ext-1.1.24-jars.zip -d /opt/geotrellis-contrib/lib \ | ||
&& unzip /tmp/gdal-data.zip -d /opt/geotrellis-contrib/benchmark/gdal | ||
|
||
WORKDIR /opt/geotrellis-contrib | ||
|
||
ADD archives/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz /opt/geotrellis-contrib/benchmark/gdal/native/ | ||
ADD benchmark/src/main/resources/LC08_L1GT_001003_20170921_20170921_01_RT_B1.TIF /opt/geotrellis-contrib/benchmark/src/main/resources/ | ||
|
||
RUN set -ex \ | ||
&& dpkg -x /tmp/libgdal-java_1.10.1+dfsg-5ubuntu1_amd64.deb /tmp/moop \ | ||
&& cp -f /tmp/moop/usr/lib/jni/*.so /opt/geotrellis-contrib/benchmark/gdal/native/ \ | ||
&& cp -f /tmp/moop/usr/share/java/gdal.jar /opt/geotrellis-contrib/lib/ | ||
RUN ./sbt "project benchmark" compile | ||
|
||
ENV GDAL_DATA=/opt/geotrellis-contrib/benchmark/gdal/gdal-data | ||
ENV LD_LIBRARY_PATH=/opt/geotrellis-contrib/benchmark/gdal/native:${LD_LIBRARY_PATH} |
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,23 @@ | ||
.PHONY: all | ||
|
||
|
||
all: ../archives/imageio-ext-1.1.24-jars.zip \ | ||
../archives/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz \ | ||
../archives/gdal-data.zip \ | ||
../archives/libgdal-java_1.10.1+dfsg-5ubuntu1_amd64.deb \ | ||
src/main/resources/LC08_L1GT_001003_20170921_20170921_01_RT_B1.TIF | ||
|
||
../archives/imageio-ext-1.1.24-jars.zip: | ||
curl -L "https://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.24/imageio-ext-1.1.24-jars.zip" -o $@ | ||
|
||
../archives/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz: | ||
curl -L "https://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.24/native/gdal/linux/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz" -o $@ | ||
|
||
../archives/gdal-data.zip: | ||
curl -L "https://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.24/native/gdal/gdal-data.zip" -o $@ | ||
|
||
../archives/libgdal-java_1.10.1+dfsg-5ubuntu1_amd64.deb: | ||
curl -L "http://mirrors.kernel.org/ubuntu/pool/universe/g/gdal/libgdal-java_1.10.1+dfsg-5ubuntu1_amd64.deb" -o $@ | ||
|
||
src/main/resources/LC08_L1GT_001003_20170921_20170921_01_RT_B1.TIF: | ||
curl -L "http://landsat-pds.s3.amazonaws.com/c1/L8/001/003/LC08_L1GT_001003_20170921_20170921_01_RT/LC08_L1GT_001003_20170921_20170921_01_RT_B1.TIF" -o $@ |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [[ -n "${GEOTRELLIS_CONTRIB_DEBUG}" ]]; then | ||
set -x | ||
fi | ||
|
||
function usage() { | ||
echo -n \ | ||
"Usage: $(basename "$0") | ||
Run GeoTrellis Contrib benchmarks | ||
" | ||
} | ||
|
||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then | ||
if [[ "${1:-}" == "--help" ]]; then | ||
usage | ||
else | ||
echo "Executing GeoTrellis Contrib benchmarks" | ||
pushd benchmark | ||
make | ||
popd | ||
docker-compose run --rm benchmark "project benchmark" "jmh:run" | ||
fi | ||
fi |