Knime inside Linux inside Windows

I need to pack a KNIME flow for Linux deployment, but working on Windows PC. Which would be best to do:

  • run KNIME inside a virtual machine like vmware? (seems heavy)
  • pack KNIME into a linux docker container? (how to get a GUI for KNIME inside the container?)

Thanks!

We have a similar situation to this. All our server admins are running on Windows, but our server architecture is Linux-based. Almost everything works out of the box transferring between the two - the main thing that doesnt being hard-coded file paths. To overcome this on those workflows where this is an issue, we have a wrapped metanode which detects the environment. This works as follows:

image

Extract system properties extracts a single propert - os.name.
The Rule Engine is configured as follows:

$Value$ LIKE "Windows*" => FALSE
TRUE => TRUE

with the result in a new column, isUnix. The column filter keeps only that result column.

Once you have that value, you can ‘fix’ any windows paths hardcoded to the corresponding linux paths.

Other tips - if you are building file paths manually anywhere in e.g. Java Snippets, dont use string manipulation, use e.g.

File parent = new File(parentPath);
File f = new File(parent, fName);
String newPath = f.toString();
//Or..
URL url=f.toURI().toURL();

If you need to test on a linux environment, it is possible in e.g. VirtualBox, but it’s pretty slow and clunky if the host PC is doing anything else at all!

Everything else really does just work (and obviously and paths from e.g. List Files or List Folders nodes will already be in the format supplied by the local os)

Steve

4 Likes

Thanks Steve, for your nice article on that topic. Well written. There is another possible way to use the combination windows clients and linux server seamless:

If you use the same directory structures on Analytics Platform and server and want to access files stored in your worklow repository: Use the knime:// protocol. As an “absolute” path like knime://knime.mountpoint/ (links to the actual root of the workflow repository) or you are relative paths using knime://knime.workflow/ for the actual workflow directory.

Find a short video on that topic here : https://www.knime.com/knime-introductory-course/chapter2/section1/absolute-and-relative-paths-knime-protocol

Best,

Michael

2 Likes

After a bit of research, I think this is the best option:

  • be sure to have Windows 10 with Ubuntu Linux subsystem incorporated (not emulation)
  • use that provided Ubuntu, and enable xterminal
  • use KNIME from there

This will give you the flexibility of Linux, without the VM overhead.

Cheers,
Fernando

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.