How do I add Netflix's Polynote as a workspace within Domino?
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:
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
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:
start: [ "/var/opt/polynote/polynote" ]
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.
Customer Success Engineer @ Domino
Is there a reason why polynote breaks the pattern for the http proxy port? I believe all the other workspaces use port 8888
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.
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!