diff --git a/Dockerfile b/Dockerfile index ab873fd..487472c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file +# 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 \ No newline at end of file diff --git a/executor.epf b/executor.epf index c8fce4e..22b7ac1 100644 --- a/executor.epf +++ b/executor.epf @@ -1,6 +1,6 @@ # 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" @@ -8,7 +8,7 @@ /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= -/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= /instance/org.knime.python3.scripting.nodes/python3Path= @@ -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= -/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= /instance/org.knime.python2/python3Path= @@ -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 diff --git a/executor.zip b/executor.zip deleted file mode 100644 index 8d35e43..0000000 Binary files a/executor.zip and /dev/null differ diff --git a/knime_dl_cpu.yml b/knime_dl_cpu.yml new file mode 100644 index 0000000..7df7a50 --- /dev/null +++ b/knime_dl_cpu.yml @@ -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 \ No newline at end of file diff --git a/knime_py39.yml b/knime_py39.yml deleted file mode 100644 index afb1486..0000000 --- a/knime_py39.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: knime_py39 -channels: - - conda-forge - - knime -dependencies: - - python=3.9 - - geopandas - - pyarrow - - ipython - - py4j - - knime-python-scripting=4.7 - -prefix: /opt/knime/mambaforge/envs/knime_py39 \ No newline at end of file diff --git a/py3_knime.yml b/py3_knime.yml new file mode 100644 index 0000000..98fd5c0 --- /dev/null +++ b/py3_knime.yml @@ -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 \ No newline at end of file