FAQ: Polynote from Netflix

tyler.bubintyler.bubin Member, Domino Posts: 8
edited November 2019 in Q&A

How do I add Netflix's Polynote as a workspace within Domino?

Comments

  • katie.shakmankatie.shakman Administrator, Domino Posts: 192 admin
    edited November 2019

    You can add Polynote as a workspace option for any of your compute environments in Domino. If you just want to see what it looks like, you can head over to this Domino project on try.dominodatalab.com:

    Ready to set it up in your own Domino environment? Follow these steps to get up and running:

    Select the compute environment you want to add Polynote into, click Edit Dockerfile (you must have edit permissions on the environment in order to do this), and add the following to the Dockerfile Instructions:

    USER root
    RUN cd /var/opt && wget https://github.com/polynote/polynote/releases/download/0.2.8/polynote-dist.tar.gz && tar -zxvpf polynote-dist.tar.gz && chown -R ubuntu:ubuntu /var/opt/polynote
    RUN echo "listen:" > /var/opt/polynote/config.yml && echo "  host: 0.0.0.0" >> /var/opt/polynote/config.yml && echo "  port: 8192" >> /var/opt/polynote/config.yml && chown ubuntu:ubuntu /var/opt/polynote/config.yml
    RUN apt update -y && apt install python3-pip -y
    ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 
    RUN pip3 install jep
    

    (Note that the last 3 lines above are for Python 3 support within the Polynote notebook. You'll need to have Python 3 installed in your environment in order for this to work.)

    Next, scroll down to Pluggable Workspace Tools and add this launch configuration:

        title: "polynote"
        start: [ "/var/opt/polynote/polynote" ]
        httpProxy:
           port: 8192
    

    Finally, scroll down to Pre Run Script (under Run Setup Scripts) and add:

    echo "storage:" >> /var/opt/polynote/config.yml && echo -e " dir: $DOMINO_WORKING_DIR/notebooks" >> /var/opt/polynote/config.yml && echo -e " cache: $DOMINO_WORKING_DIR/tmp" >> /var/opt/polynote/config.yml
    

    Click Build to build and save the changes to your compute environment, and you're ready to use Polynote as a workspace. Here's what a sample notebook might look like:


    This configuration enables Polynote with Scala and Python. Note that Polynote can be configured to use with a Spark cluster.

    For more info on compute environments in Domino, check out our docs article (https://docs.dominodatalab.com/en/4.0/reference/environments/Environment_management.html) or post a community question.

    Thoughts? Suggestions? Questions about using Polynote in Domino? Leave a comment below.

    Katie

    Customer Success Engineer @ Domino

  • brent.amosbrent.amos Member Posts: 1

    Is there a reason why polynote breaks the pattern for the http proxy port? I believe all the other workspaces use port 8888

  • zach.ingrahamzach.ingraham Member, Administrator, Moderator, Domino Posts: 42 admin

    I'm checking in with the engineer that built the integration to be sure, but I don't think there is a great reason. Polynote has a default of 8192 which we adopted in this case while in other cases we've used 8888. It looks like we're passing the port number throughout the example, so it should work if you just replace 8192 with 8888 for consistency.

    I haven't actually had a chance to check this yet and will follow up when I've gotten confirmation, but wanted to get you a quicker response rather than waiting to run it down.

  • katie.shakmankatie.shakman Administrator, Domino Posts: 192 admin
    edited November 2019

    Hi @brent.amos,

    Thanks for the question! The person who originally set this up (Anthony from our Sales Engineering team) used the Polynote default port of 8192, but you can certainly can use 8888. I just gave it a try and it seems to work fine. Just remember to set the same port in both places (the Dockerfile instructions where you set up the Polynote config, and the Pluggable Workspaces settings below where you configure the launching behavior for the workspace). Attaching a screenshot calling out the two places where the port is set.


    Please let us know if you have any further questions!

    Best,

    Katie

    Katie

    Customer Success Engineer @ Domino

Sign In or Register to comment.