Can I run Docker in Knime?

Hi,

I have been using Docker to successfully run a number of containers/images (Gnina, Diffdock, Chameleon etc.) and started to look on how I could integrate these in my Knime admet worflow.

The handful of google search results point to a limitation of the non-business Knime platform…

Has anyone tried this already?

thanks

O.

not sure I 100% get your usecase, but here is some information:

KNIME comes with a pre-bundled python environment - you can inspect packages that come with it by default here:

Docker is not part of it so by default you wont be able to run docker in KNIME.

That said it is possible to create custom python environments that can include other packages so you could set something up to run docker yourself.

Follow the instructions here:

Hi Martin, thanks for the reply.

I have used python nodes to call specific executables (with bespoke python envs I should add).

Docker images have in built envs so that dependencies are no longer an issue.

In order to be able to call a specific program to perform a task within a python node (done this with Vina), I would have to install the software on my machine thus negating the ease of use of a docker image. Perhaps Knime and/or Docker developers could create a new Docker node being able to call a specific image???

A simple workaround would be to use a Python script node to execute the Docker commands via the subprocess package. Depending on your specific needs, you can build the commands beforehand using string manipulation or an expression.

Below is an example of how to use a string; in this case, the flow variable ‘COMPOSE UP’:

1 Like

Thank you so much.

I launched Docker desktop before running the python node calling a GNINA image for docking.

It worked just fine!

I could have installed Docker CL but I did not want to create issue with my current setup.

2 Likes