Hello @ThoMi ,
I’d like to add to what @mlauber71 had to say;
KNIME server AMIs come with python/conda installed and configured for the executor.
R is installed, but not configured in the executor.
If your server does not yet have R installed, see [0] for installation tips.
To configure the executor,
get location of R executable - which R
$ which R
/usr/bin/R
then, edit /srv/knime_server/workflow_repository/config/client_profiles/executor/executor.epf and add:
/instance/org.knime.ext.r.bin/knime.r.home=<location>
e.g.
/instance/org.knime.ext.r.bin/knime.r.home=/usr/bin/R
This is what my executor.epf looks like now:
$ more /srv/knime_server/config/client-profiles/executor/executor.epf
file_export_version=3.0
\!/=
/instance/org.knime.workbench.core/database_timeout=120
/instance/org.knime.ext.r.bin/knime.r.home=/usr/bin/R
# Add a mount point for this server. This is useful for the new filehandling nodes.
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/active=true
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/address=${origin:KNIME-EJB-Address}
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/factoryID=com.knime.explorer.server
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/mountID=${origin:KNIME-Default-Mountpoint-ID}
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/mountpointNumber=1
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/restPath=${origin:KNIME-Context-Root}/rest
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/user=${sysprop:user.name}
/instance/org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/useRest=true
/instance/org.knime.python2/condaDirectoryPath=/opt/miniconda3
/instance/org.knime.python2/defaultPythonOption=python3
/instance/org.knime.python2/python3CondaEnvironmentName=py39_knime
/instance/org.knime.python2/python3Path=/opt/miniconda3/envs/py39_knime/bin/python3
then restart executor: sudo systemctl restart knime-executor
I can verify that the executor correctly picked up this change by looking at the combined-preferences.epf:
knime@ip-10-0-1-5:/opt/knime/knime-executor/workspace/.metadata/.plugins/org.knime.product$ more combined-preferences.epf
#
#Thu Nov 03 17:55:18 UTC 2022
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/user=knime
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/mountpointNumber=1
org.knime.python2/condaDirectoryPath=/opt/miniconda3
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/restPath=/knime/rest
org.knime.workbench.core/database_timeout=120
file_export_version=3.0
org.knime.python2/defaultPythonOption=python3
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/factoryID=com.knime.explorer.server
org.knime.ext.r.bin/knime.r.home=/usr/bin/R
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/useRest=true
org.knime.python2/python3CondaEnvironmentName=py39_knime
\!/=
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/active=true
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/mountID=knime-server
org.knime.workbench.explorer.view/mountpointNode/KNIME-Server/address=${origin\:KNIME-EJB-Address}
org.knime.python2/python3Path=/opt/miniconda3/envs/py39_knime/bin/python3
Once the executor knows where to find R, then you can use the Conda Environment Propagation node in your workflow to configure the environment for subsequent R nodes to work in. [2]
After that, workflow-hack away!
Regards,
Nickolaus
[0] KNIME Interactive R Statistics Integration Installation Guide
[1] KNIME Interactive R Statistics Integration Installation Guide
[2] Manage Your Python Environments with Conda and KNIME | KNIME