Skip to content

Commit

Permalink
Merge pull request #1 from spatial-data-lab/knime5.3.2-geospatial1.2
Browse files Browse the repository at this point in the history
Knime5.3.2 geospatial1.2
  • Loading branch information
wybert authored Oct 29, 2024
2 parents 8c79456 + ecdfee5 commit a7536ce
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 35 deletions.
49 changes: 32 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
# Define the base image
FROM registry.hub.knime.com/knime/knime-full:r-5.1.2-433
FROM knime/knime-full:r-5.3.2-564
# registry.hub.knime.com/knime/knime-full:r-5.3.1-498
# knime/knime-full:r-5.3.2-563
# Define the list of update sites and features
# Optional, the default is the KNIME Analytics Platform update site (first entry in the list below)
ENV KNIME_UPDATE_SITES=https://update.knime.com/analytics-platform/5.1,https://update.knime.com/community-contributions/trusted/5.1
# Install a feature from the Community Trusted update site
# ENV KNIME_FEATURES="sdl.harvard.features.geospatial.feature.group"
ENV KNIME_FEATURES="sdl.harvard.features.geospatial.feature.group"


# Change to the root user
USER root
# Install the ca-certificates package to avoid SSL certificate issues
RUN apt update && apt install -y ca-certificates curl
# RUN apt update && apt install -y ca-certificates curl
# Update/upgrade package manager and install ca-certificates to enable ca certificates that micromamba (for python) is asking for
RUN apt-get update && \
apt-get upgrade -yq && \
apt-get install -yq \
ca-certificates curl && \
# cleanup
rm -rf /var/lib/apt/lists/*

# Change back to the knime user
USER knime


ENV KNIME_UPDATE_SITES=https://update.knime.com/analytics-platform/5.2,https://update.knime.com/community-contributions/trusted/5.2
# Install a feature from the Community Trusted update site
ENV KNIME_FEATURES="sdl.harvard.features.geospatial.feature.group"

# Execute extension installation script
RUN ./install-extensions.sh

# set up the Python environment

# Install Python 3.9
RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
# /home/knime/
RUN bash -c "bash Miniforge3-$(uname)-$(uname -m).sh -b -p /home/knime/condaforge"
RUN rm -rf Miniforge3-$(uname)-$(uname -m).sh
ENV PATH="/home/knime/condaforge/bin:$PATH"

# Install Python packages
COPY knime_py39.yml /home/knime/knime_py39.yml
RUN /home/knime/condaforge/bin/conda env create -f /home/knime/knime_py39.yml
RUN rm -rf /home/knime/knime_py39.yml
# RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
# # /home/knime/
# RUN bash -c "bash Miniforge3-$(uname)-$(uname -m).sh -b -p /home/knime/condaforge"
# RUN rm -rf Miniforge3-$(uname)-$(uname -m).sh
# ENV PATH="/home/knime/condaforge/bin:$PATH"

# # Install Python packages
COPY py3_knime.yml /home/knime/py3_knime.yml
RUN /home/knime/miniconda3/condabin/conda env create -f /home/knime/py3_knime.yml
COPY knime_dl_cpu.yml /home/knime/knime_dl_cpu.yml
RUN /home/knime/miniconda3/condabin/conda env create -f /home/knime/knime_dl_cpu.yml
# RUN rm -rf /home/knime/py3_knime.yml
10 changes: 5 additions & 5 deletions executor.epf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

# add python path here
/instance/org.knime.conda/condaDirectoryPath=/home/knime/condaforge
/instance/org.knime.conda/condaDirectoryPath=/home/knime/miniconda3

# B - KNIME Python Integration - Default options for Python Integration. By default KNIME uses the bundled environment (shipped with KNIME) if no Conda Environment Propagation node is used.
# Line below can be set to either "bundled" (default), "conda" or "manual"
/instance/org.knime.python3.scripting.nodes/pythonEnvironmentType=conda
/instance/org.knime.python3.scripting.nodes/bundledCondaEnvPath=org_knime_pythonscripting
# Following rows are only required if "bundled" value above is replaced with "conda"
/instance/org.knime.python3.scripting.nodes/python2CondaEnvironmentDirectoryPath=<path to default conda environment dir>
/instance/org.knime.python3.scripting.nodes/python3CondaEnvironmentDirectoryPath=/home/knime/condaforge/envs/knime_py39
/instance/org.knime.python3.scripting.nodes/python3CondaEnvironmentDirectoryPath=/home/knime/miniconda3/envs/py3_knime
# Following rows are only required if "bundled" value above is replaced with "manual"
/instance/org.knime.python3.scripting.nodes/python2Path=<path to python2 env>
/instance/org.knime.python3.scripting.nodes/python3Path=<path to python3 env>
Expand All @@ -20,7 +20,7 @@
/instance/org.knime.python2/serializerId=org.knime.python2.serde.arrow
# Following rows are only required if "conda" is set above
/instance/org.knime.python2/python2CondaEnvironmentDirectoryPath=<path to default conda environment dir>
/instance/org.knime.python2/python3CondaEnvironmentDirectoryPath=/home/knime/condaforge/envs/knime_py39
/instance/org.knime.python2/python3CondaEnvironmentDirectoryPath=/home/knime/miniconda3/envs/py3_knime
# Following rows are only required if "conda" value above is replaced with "manual"
/instance/org.knime.python2/python2Path=<path to python2 env>
/instance/org.knime.python2/python3Path=<path to python3 env>
Expand All @@ -30,12 +30,12 @@
# Select either "python" or "dl" (without quotation marks) in next row. If "python" is used, the configuration of section B above is reused. If "dl" is used, a custom config for Deep Learning can be provided.
/instance/org.knime.dl.python/pythonConfigSelection=dl
# Following rows only required if row above is set to "dl"
/instance/org.knime.dl.python/kerasCondaEnvironmentDirectoryPath=/home/knime/condaforge/envs/knime_dl_cpu
/instance/org.knime.dl.python/kerasCondaEnvironmentDirectoryPath=/home/knime/miniconda3/envs/knime_dl_cpu
/instance/org.knime.dl.python/librarySelection=keras
/instance/org.knime.dl.python/manualConfig=python3
/instance/org.knime.dl.python/pythonEnvironmentType=conda
/instance/org.knime.dl.python/serializerId=org.knime.python2.serde.arrow
/instance/org.knime.dl.python/tf2CondaEnvironmentDirectoryPath=/home/knime/condaforge/envs/knime_dl_cpu
/instance/org.knime.dl.python/tf2CondaEnvironmentDirectoryPath=/home/knime/miniconda3/envs/knime_dl_cpu
/instance/org.knime.dl.python/tf2ManualConfig=python3

# R home
Expand Down
Binary file removed executor.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions knime_dl_cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: knime_dl_cpu
channels:
- conda-forge
- knime
- anaconda
dependencies:
- python=3.6
- h5py=2.8
- tensorflow-mkl=1.12
- keras=2.2.4
- pandas=0.25.3
- py-xgboost-cpu
# - scikit-learn
# - geopandas
# - scipy
prefix: /home/knime/miniconda3/envs/knime_dl_cpu
13 changes: 0 additions & 13 deletions knime_py39.yml

This file was deleted.

31 changes: 31 additions & 0 deletions py3_knime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: py3_knime
channels:
- conda-forge
- knime
dependencies:
- python=3.11
- geopandas
- pyarrow
- knime-python-scripting=5.3
- matplotlib
- earthengine-api
- geemap
- folium
- mapclassify
- keplergl
- h3-py
- geopy
- esda
- libpysal
- mgwr
- osmnx
- polyline
- pulp
- pysal
- rasterio
- seaborn
- sympy
- pointpats
- scipy
- scikit-learn
prefix: /home/knime/miniconda3/envs/py3_knime

0 comments on commit a7536ce

Please sign in to comment.