Skip to content

KNIME Analytics Platform & SDK with Docker Container in X11 desktop

License

Notifications You must be signed in to change notification settings

Sanmoo/knime-docker

 
 

Repository files navigation

KNIME Analytics Platform 3.7.1+Java 8 (1.8.0_202) JDK+Maven 3.6+Python 3.5/2.7+pip 19.0+node 11.11+ npm 6.7+Gradle 5.2+X11 (Desktop)

Note: If you need to run KNIME Studio over Openshift, Kubernetes, container cluster platforms using noVNC from any HTML5 capable web browsers, you might want to check out:

Components:

  • KNIME Platform latest (v 3.7.1) for Machine Learning & Big Data Analytics
  • java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
  • Apache Maven 3.6.0
  • Python 3.5.2 / Python 2.7.12 + pip 19.0.3
  • Node v11.11.0 + npm 6.7.0 (from NodeSource official Node Distribution)
  • Gradle 5.2
  • Other tools: git wget unzip vim python python-setuptools python-dev python-numpy

Run (recommended for easy-start)

Image is pulling from openkbs/netbeans

./run.sh

Where are workspace and data?

  • The "./run.sh" will create and map the container's data and workspace directories to the host's directory as below (unless you change ./.env configuration).
  • You can copy source data or projects/workflow to these two directory and the KNIME Studio inside the container will have direct access to the files you just copy.
$HOME/data-docker/knime-docker

.
├── data
└── workspace
    └── Example Workflows
        ├── Basic Examples
        ├── Customer Intelligence
        ├── Retail
        ├── Social Media
        ├── TheData
        └── workflowset.meta

And, "docker-compose" will use the current git project directory's "./workspace" to map the container's /home/developer/workspace:

./.eclipse
./workspace

Note: You can copy your KNIME workflow project in and out the workspaces and it is directly mapped into the container's /home/developer/workspace.

Build

You can build your own image locally.

./build.sh

(Optional Use) Run Python code

To run Python code

docker run --rm openkbs/knime-docker python -c 'print("Hello World")'

or,

mkdir ./data
echo "print('Hello World')" > ./data/myPyScript.py
docker run -it --rm --name some-knime-docker -v "$PWD"/data:/data openkbs/knime-docker python myPyScript.py

or,

alias dpy='docker run --rm openkbs/knime-docker python'
dpy -c 'print("Hello World")'

(Optional Use) Compile or Run java while no local installation needed

Remember, the default working directory, /data, inside the docker container -- treat is as "/". So, if you create subdirectory, "./data/workspace", in the host machine and the docker container will have it as "/data/workspace".

#!/bin/bash -x
mkdir ./data
cat >./data/HelloWorld.java <<-EOF
public class HelloWorld {
   public static void main(String[] args) {
      System.out.println("Hello, World");
   }
}
EOF
cat ./data/HelloWorld.java
alias djavac='docker run -it --rm --name some-jre-mvn-py3 -v '$PWD'/data:/data openkbs/jre-mvn-py3 javac'
alias djava='docker run -it --rm --name some-jre-mvn-py3 -v '$PWD'/data:/data openkbs/jre-mvn-py3 java'

djavac HelloWorld.java
djava HelloWorld

And, the output:

Hello, World

Hence, the alias above, "djavac" and "djava" is your docker-based "javac" and "java" commands and it will work the same way as your local installed Java's "javac" and "java" commands.

Reference

See also VNC/noVNC docker-based IDE or Analytics Platform

See Also - docker-based IDE

Display X11 Issue

More resource in X11 display of Eclipse on your host machine's OS, please see

  • X11 Display problem

  • X11 Display with Xhost

  • You might see the warning message in the launching xterm console like below, you can just ignore it. I googles around and some blogs just suggested to ignore since the IDE still functional ok.

Releases information

developer@69db4f81bbd0:~/workspace$ /usr/scripts/printVersions.sh

  • echo JAVA_HOME=/usr/java JAVA_HOME=/usr/java
  • java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
  • mvn --version Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z) Maven home: /usr/apache-maven-3.6.0 Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: /usr/jdk1.8.0_202/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.18.0-17-generic", arch: "amd64", family: "unix"
  • python -V Python 2.7.12
  • python3 -V Python 3.5.2
  • pip --version pip 19.0.3 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
  • pip3 --version pip 19.0.3 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
  • gradle --version

Welcome to Gradle 5.2.1!

Here are the highlights of this release:

  • Define sets of dependencies that work together with Java Platform plugin
  • New C++ plugins with dependency management built-in
  • New C++ project types for gradle init
  • Service injection into plugins and project extensions

For more details see https://docs.gradle.org/5.2.1/release-notes.html


Gradle 5.2.1

Build time: 2019-02-08 19:00:10 UTC Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183

Kotlin DSL: 1.1.3 Kotlin: 1.3.20 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018 JVM: 1.8.0_202 (Oracle Corporation 25.202-b08) OS: Linux 4.18.0-17-generic amd64

  • npm -v 6.7.0
  • node -v v11.12.0
  • cat /etc/lsb-release /etc/os-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS" NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.6 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial

About

KNIME Analytics Platform & SDK with Docker Container in X11 desktop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 95.0%
  • Dockerfile 5.0%