Create a Compute Environment for an h2o flow notebook

dan.stern Member, Moderator, Domino Posts: 37 mod
edited February 2020 in Tutorials & Best Practices

If you would like to create a compute environment that will allow you to run an h2o flow notebook, the following definitions can be used in your Compute Environment (CE).

Compute Environment (CE) Definition

Base Image

Create a new or duplicate CE and use one of the domino standard base images.

Note that our current standard images are Ubuntu 18, but this should also work with an older Ubuntu 16 image. Your results on non standard images may vary, but in general the definitions below should work on most images.

Insert in CE Dockerfile Instructions

#### INSTALL H2O Flow from workspaces
RUN chmod +x /var/opt/workspaces/h2o/install
RUN /var/opt/workspaces/h2o/install

Insert in Pluggable Workspace Tools

 title: "H2O Flow"
  iconUrl: ""
 start: [ "/var/opt/workspaces/h2o/start" ]
  port: 8888


  • justin.phelps
    justin.phelps Member Posts: 1

    While trying to get this to work, I ran into a few problems.

    1. H20 needs to be on version for this to work. Anything newer will not work as of this post, and we are waiting on H2O to fix this issue.
    2. Your compute environment needs to be running Java 8. Anything later is not supported by H2O.
    3. The default start script was trying to open port 8080. The file /var/opt/workspaces/h20/start needs to be modified or a new one created with the correct port of 8888.
    4. To run this in Domino 4.2, you need to add two parameters under "httpProxy"
    • rewrite: false 
    • requireSubdomain: false
    • internalPath: "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}"

    I started with the Domino Analytics Distribution Py3.6 R3.6 (base image and added the following to the bottom of the Dockerfile and Plugable Workspace File. 

    Dockerfile Instructions:

    # Install OpenJDK-8
    RUN apt-get update && \
       apt-get install -y openjdk-8-jdk && \
       apt-get install -y ant && \
       apt-get clean;
    # Fix certificate issues
    RUN apt-get update && \
       apt-get install ca-certificates-java && \
       apt-get clean && \
       update-ca-certificates -f;
    # Setup docker environment version 
    ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
    #Set default system version  
    RUN sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
    RUN export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
    RUN export PATH=$PATH:$JAVA_HO
    #download and install h20 flow v3.18
    RUN cd /opt/ && \
        curl -o && \
       sudo unzip && \
    RUN ln -s /opt/h2o- /opt/h2o
    #make custome start script that has port 8888.
    RUN mkdir -p /var/opt/workspaces/h2o
    RUN echo '#!/bin/bash\n\nPREFIX=/${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID} \n\njava -jar /opt/h2o/h2o.jar -port 8888 -ice_root /tmp/h2o -flow_dir $DOMINO_WORKING_DIR -context_path ${PREFIX}' > /var/opt/workspaces/h2o/startFlow
    #make startup script executable 
    RUN sudo chmod -R a+rx /opt/h2o/
    RUN sudo chmod a+x /var/opt/workspaces/h2o/startFlow

    Pluggable Workspace Tools: 

      title: "H2O Flow"
      iconUrl: ""
      start: [ "/var/opt/workspaces/h2o/startFlow" ]
       rewrite: false
       port: 8888
       internalPath: "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}"
       requireSubdomain: false
  • katie.shakman
    katie.shakman Administrator, Domino Posts: 257 admin
    edited June 2020

    Thanks for sharing your experience and findings @justin.phelps ! This will help improve our H2O docs and integration experience.


    Field Data Scientist @ Domino

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!