-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
47 additions
and
307 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
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,58 +1,47 @@ | ||
FROM mundialis/actinia:alpine-dependencies-2023-10-12 as build-base | ||
FROM mundialis/actinia:alpine-dependencies-2023-12-06 as build-base | ||
FROM osgeo/grass-gis:releasebranch_8_3-alpine as grass | ||
|
||
FROM build-base as build | ||
FROM build-base as requirements | ||
|
||
LABEL authors="Carmen Tawalika,Anika Bettge,Markus Neteler,Sören Gebbert" | ||
LABEL authors="Carmen Tawalika,Anika Weinmann,Markus Neteler,Sören Gebbert" | ||
LABEL maintainer="[email protected],[email protected],[email protected]" | ||
|
||
COPY . /src/actinia_core | ||
WORKDIR /src/actinia_core | ||
RUN pip3 install build && python3 -m build --outdir /build . | ||
RUN if [[ -f /build/UNKNOWN* ]];then echo "ERROR - Check actinia-core build";exit 1;fi | ||
|
||
|
||
FROM mundialis/actinia:alpine-dependencies-2023-06-03 as actinia_installation | ||
|
||
ENV LC_ALL "en_US.UTF-8" | ||
ENV GDAL_CACHEMAX=2000 | ||
ENV GRASS_COMPRESSOR=ZSTD | ||
ENV GRASS_SKIP_MAPSET_OWNER_CHECK 1 | ||
ENV GISBASE "" | ||
ENV ACTINIA_API_VERSION 3.4.0 | ||
|
||
USER root | ||
|
||
# GRASS GIS SETUP | ||
COPY --from=grass /usr/local/bin/grass /usr/local/bin/grass | ||
COPY --from=grass /usr/local/grass* /usr/local/grass/ | ||
RUN pip3 install --upgrade pip six grass-session --ignore-installed six | ||
RUN pip install --upgrade pip six grass-session --ignore-installed six | ||
RUN ln -s /usr/local/grass `grass --config path` | ||
RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \ | ||
pdal --version && \ | ||
python3 --version | ||
python --version | ||
|
||
# install GRASS GIS addon d.rast.multi, because it is needed for STRDS render | ||
# endpoint | ||
# Install GRASS GIS addon d.rast.multi (needed for STRDS render endpoint) | ||
RUN grass --tmp-location EPSG:4326 --exec g.extension -s \ | ||
extension=d.rast.multi url=https://github.com/mundialis/d_rast_multi | ||
extension=d.rast.multi url=https://github.com/mundialis/d_rast_multi | ||
|
||
# actinia-core and actinia libs BUILD | ||
WORKDIR /build | ||
ARG WHEEL_NAME=actinia_api-${ACTINIA_API_VERSION}-py3-none-any.whl | ||
RUN curl -L --output /build/${WHEEL_NAME} \ | ||
https://github.com/actinia-org/actinia-api/releases/download/${ACTINIA_API_VERSION}/${WHEEL_NAME} | ||
|
||
# Install actinia-core and libs | ||
COPY --from=build /build/*.whl /build/ | ||
RUN pip3 install /build/* | ||
FROM build-base as build | ||
|
||
# Duplicate install actinia_core requirements. They are already included | ||
# in alpine-build / alpine-runtime images, but check for updates here. | ||
COPY requirements.txt /src/requirements.txt | ||
RUN pip3 install -r /src/requirements.txt | ||
COPY . /src/actinia_core | ||
WORKDIR /src/actinia_core | ||
RUN pip install build && python -m build --outdir /build . | ||
RUN if [[ -f /build/UNKNOWN* ]];then echo "ERROR - Check actinia-core build";exit 1;fi | ||
|
||
|
||
FROM requirements as actinia | ||
|
||
# Copy actinia config file and start scripts + set needed envs | ||
# actinia-core and requirements installation | ||
WORKDIR /build | ||
COPY --from=build /build/*.whl /build/ | ||
RUN pip install /build/* | ||
|
||
# Copy actinia config file and start script | ||
COPY docker/actinia-core-alpine/actinia.cfg /etc/default/actinia | ||
COPY docker/actinia-core-alpine/start.sh /src/start.sh | ||
|
||
|
@@ -66,9 +55,6 @@ RUN mkdir -p /actinia_core/grassdb && \ | |
mkdir -p /actinia_core/userdata && \ | ||
ln -s /actinia_core /root/actinia | ||
|
||
|
||
FROM actinia_installation as actinia | ||
|
||
VOLUME /grassdb | ||
WORKDIR /src/actinia_core | ||
|
||
|
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 |
---|---|---|
|
@@ -3,20 +3,9 @@ FROM mundialis/actinia-core:latest as actinia_test | |
LABEL authors="Carmen Tawalika,Anika Weinmann" | ||
LABEL maintainer="[email protected],[email protected]" | ||
|
||
ENV ACTINIA_API_VERSION 3.4.0 | ||
|
||
ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 | ||
ENV ACTINIA_CUSTOM_TEST_CFG /etc/default/actinia_test | ||
# TODO do not set DEFAULT_CONFIG_PATH if this is fixed | ||
ENV DEFAULT_CONFIG_PATH /etc/default/actinia_test | ||
ENV GRASS_DATABASE=/tmp/actinia_core/grassdb | ||
|
||
# install things only for tests | ||
RUN apk add redis | ||
RUN pip3 install iniconfig colorlog | ||
|
||
# uninstall actinia core from FROM-image | ||
RUN pip3 uninstall actinia-core -y | ||
# Path must be equal to actinia config "GRASS_DATABASE" | ||
ARG GRASS_DATABASE=/tmp/actinia_core/grassdb | ||
|
||
# add data for tests | ||
WORKDIR ${GRASS_DATABASE} | ||
|
@@ -31,6 +20,16 @@ RUN wget --quiet https://grass.osgeo.org/sampledata/north_carolina/nc_spm_mapset | |
mv modis_lst nc_spm_08/modis_lst | ||
RUN chown -R 1001:1001 nc_spm_08/modis_lst && chmod -R g+w nc_spm_08/modis_lst | ||
|
||
# install GRASS addons required for tests | ||
RUN grass --tmp-location EPSG:4326 --exec g.extension -s extension=r.colors.out_sld | ||
|
||
# install things only for tests | ||
RUN apk add redis | ||
RUN pip install pytest pytest-cov iniconfig | ||
|
||
# uninstall actinia core from FROM-image | ||
RUN pip uninstall actinia-core -y | ||
|
||
RUN rmdir /actinia_core/grassdb | ||
RUN rmdir /actinia_core/userdata | ||
RUN rmdir /actinia_core/resources | ||
|
@@ -41,21 +40,11 @@ RUN rmdir /actinia_core/workspace/tmp | |
RUN rmdir /actinia_core/workspace | ||
RUN rmdir /actinia_core | ||
|
||
# install actinia-api | ||
RUN pip3 install actinia-api@https://github.com/actinia-org/actinia-api/releases/download/${ACTINIA_API_VERSION}/actinia_api-${ACTINIA_API_VERSION}-py3-none-any.whl | ||
|
||
# install GRASS addons required for tests | ||
RUN grass --tmp-location EPSG:4326 --exec g.extension -s extension=r.colors.out_sld | ||
RUN grass --tmp-location EPSG:4326 --exec g.extension -s \ | ||
extension=d.rast.multi url=https://github.com/mundialis/d_rast_multi | ||
|
||
# copy needed files and configs for test | ||
COPY docker/actinia-core-alpine/actinia.cfg /etc/default/actinia | ||
COPY docker/actinia-core-tests/actinia-test.cfg /etc/default/actinia_test | ||
COPY docker/actinia-core-tests/actinia-test-noauth.cfg /etc/default/actinia_test_noauth | ||
|
||
RUN pip3 install pytest pytest-cov | ||
|
||
# TODO: Postgres for tests | ||
# using tests/data/poly.gpkg | ||
|
||
|
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
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.