Getting container images
The napari container images are available from the GitHub Container Registry.
There are two types of container images available:
- napari
- napari-xpra
Since I’m running a Mac M2, I’m going to use the napari-xpra container image since it doesn’t require an X server and hopefully will be less finicky.
Let’s run napari
I’m going to use the napari documentation instructions as a guide and I ran these specific steps:
- Make sure docker is installed and running on your system. - docker --version
- From the root of your napari repo clone or fork, run (note: this could take a while even 5 minutes): - docker build --target napari -t ghcr.io/napari/napari-xpra:latest .
- Run the container: - docker run -it --rm -p 9876:9876 ghcr.io/napari/napari-xpra
- Open a browser and go to - http://localhost:9876to see the napari GUI. You should see the napari GUI in your browser.WarningCheck the interactivity of the GUI- Unfortunately, using this in Safari was popping up a paste dialog instead of allowing me to interact with the GUI. - I was able to connect to the container using Chrome. It brought up an xpra screen. I didn’t add any information to the form and clicked “Connect”. It then brought up the napari GUI. 
Part 2 - Interacting with napari in the browser
In the next post, I’ll explore how to interact with napari in the browser. Stay tuned!



