Jupyter Linux Desktop with OMERO clients
This commit is contained in:
parent
5e022a8d22
commit
051389e401
41
Dockerfile
41
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM jupyter/base-notebook
|
FROM jupyter/base-notebook:1386e2046833
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
# Useful tools for debugging connection problems
|
# Useful tools for debugging connection problems
|
||||||
|
@ -11,7 +11,8 @@ RUN apt-get update -y -q && \
|
||||||
# Desktop environment, keep in sync with jupyter_notebook_config.py
|
# Desktop environment, keep in sync with jupyter_notebook_config.py
|
||||||
# ENV DESKTOP_PACKAGE lxde
|
# ENV DESKTOP_PACKAGE lxde
|
||||||
ENV DESKTOP_PACKAGE xfce4
|
ENV DESKTOP_PACKAGE xfce4
|
||||||
RUN apt-get install -y -q \
|
RUN apt-get update -y -q && \
|
||||||
|
apt-get install -y -q \
|
||||||
xterm \
|
xterm \
|
||||||
${DESKTOP_PACKAGE}
|
${DESKTOP_PACKAGE}
|
||||||
|
|
||||||
|
@ -41,8 +42,44 @@ USER jovyan
|
||||||
# https://github.com/jupyterhub/jupyter-server-proxy/pull/151
|
# https://github.com/jupyterhub/jupyter-server-proxy/pull/151
|
||||||
RUN /opt/conda/bin/pip install https://github.com/manics/jupyter-server-proxy/archive/1f22ccf44abd7ab5f7b306d57b6adb1dc3190e8b.zip
|
RUN /opt/conda/bin/pip install https://github.com/manics/jupyter-server-proxy/archive/1f22ccf44abd7ab5f7b306d57b6adb1dc3190e8b.zip
|
||||||
RUN conda install -y -q -c manics websockify=0.9.0
|
RUN conda install -y -q -c manics websockify=0.9.0
|
||||||
|
|
||||||
ADD jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py
|
ADD jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py
|
||||||
|
|
||||||
|
|
||||||
|
########## Applications
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN apt-get update -y -q && \
|
||||||
|
apt-get install -y -q \
|
||||||
|
firefox \
|
||||||
|
less \
|
||||||
|
openjdk-8-jre \
|
||||||
|
unzip
|
||||||
|
# default-jre is java 11 which is incompatible with Fiji
|
||||||
|
|
||||||
|
USER jovyan
|
||||||
|
RUN wget -q https://downloads.imagej.net/fiji/latest/fiji-nojre.zip && \
|
||||||
|
unzip -q fiji-nojre.zip && \
|
||||||
|
echo TODO: rm fiji-nojre.zip
|
||||||
|
RUN wget -q https://github.com/ome/omero-insight/releases/download/v5.5.6/OMERO.imagej-5.5.6.zip && \
|
||||||
|
cd Fiji.app/plugins && \
|
||||||
|
unzip -q ../../OMERO.imagej-5.5.6.zip && \
|
||||||
|
echo TODO: rm OMERO.imagej-5.5.6.zip
|
||||||
|
|
||||||
|
RUN wget -q https://github.com/ome/omero-insight/releases/download/v5.5.6/OMERO.insight-5.5.6.zip && \
|
||||||
|
unzip -q OMERO.insight-5.5.6.zip && \
|
||||||
|
echo TODO: rm OMERO.insight-5.5.6.zip
|
||||||
|
|
||||||
|
RUN mkdir .java && \
|
||||||
|
cd OMERO.insight-5.5.6 && \
|
||||||
|
wget -q https://www.openmicroscopy.org/img/logos/omero-logomark.svg
|
||||||
|
# https://developer.gnome.org/desktop-entry-spec/
|
||||||
|
#COPY --chown=${NB_UID}:${NB_GID} *.desktop /home/jovyan/Desktop/
|
||||||
|
COPY --chown=1000:100 *.desktop /home/jovyan/Desktop/
|
||||||
|
# Configure default OMERO.insight server list
|
||||||
|
#COPY --chown=${NB_UID}:${NB_GID} java_userPrefs .java/.userPrefs
|
||||||
|
COPY --chown=1000:100 java_userPrefs .java/.userPrefs
|
||||||
|
|
||||||
WORKDIR ${HOME}
|
WORKDIR ${HOME}
|
||||||
|
|
||||||
# Both these should work:
|
# Both these should work:
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Fiji Is Just ImageJ
|
||||||
|
GenericName=Fiji Is Just ImageJ
|
||||||
|
X-GNOME-FullName=Fiji Is Just ImageJ
|
||||||
|
Comment=Scientific Image Analysis
|
||||||
|
Type=Application
|
||||||
|
Categories=Education;Science;ImageProcessing;
|
||||||
|
Exec=/home/jovyan/Fiji.app/ImageJ-linux64
|
||||||
|
TryExec=/home/jovyan/Fiji.app/ImageJ-linux64
|
||||||
|
Terminal=false
|
||||||
|
StartupNotify=true
|
||||||
|
Icon=/home/jovyan/Fiji.app/images/icon.png
|
||||||
|
StartupWMClass=fiji-Main
|
|
@ -0,0 +1,29 @@
|
||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2019, University of Dundee
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,13 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=OMERO.insight
|
||||||
|
GenericName=OMERO.insight
|
||||||
|
X-GNOME-FullName=OMERO.insight
|
||||||
|
Comment=OMERO desktop client
|
||||||
|
Type=Application
|
||||||
|
Categories=Education;Science;ImageProcessing;
|
||||||
|
Exec=/home/jovyan/OMERO.insight-5.5.6/bin/omero-insight
|
||||||
|
TryExec=/home/jovyan/OMERO.insight-5.5.6/bin/omero-insight
|
||||||
|
Terminal=false
|
||||||
|
StartupNotify=true
|
||||||
|
Icon=/home/jovyan/OMERO.insight-5.5.6/omero-logomark.svg
|
13
README.md
13
README.md
|
@ -1,12 +1,13 @@
|
||||||
# Jupyter Linux Desktop
|
# Jupyter OMERO client Desktop
|
||||||
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/manics/7d1f4b76ce06c2bb07db88e3496a1561/master?urlpath=desktop)
|
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/manics/jupyter-omeroanalysis-desktop/master?urlpath=Desktop)
|
||||||
|
|
||||||
Example of running a Linux desktop or window manager with noVNC inside Jupyter.
|
Run OMERO clients in a Linux desktop using Jupyter.
|
||||||
|
|
||||||
This is based on https://github.com/ryanlovett/nbnovnc
|
This is based on https://github.com/ryanlovett/nbnovnc
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build -t jupyter-desktop .
|
docker build -t jupyter-omeroanalysis-desktop .
|
||||||
docker run -it --rm -p 8888:8888 jupyter-desktop jupyter notebook --debug
|
docker run -it --rm -p 8888:8888 jupyter-omeroanalysis-desktop
|
||||||
```
|
```
|
||||||
Go to `/desktop` e.g. http://localhost:8888/desktop and if you're lucky you'll see the desktop you installed.
|
|
||||||
|
Open the displayed URL, then go to `/Desktop` e.g. http://localhost:8888/Desktop and if you're lucky you'll see a Linux desktop with icons for OMERO.insight and FIJI.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||||
|
<map MAP_XML_VERSION="1.0"/>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||||
|
<map MAP_XML_VERSION="1.0"/>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||||
|
<map MAP_XML_VERSION="1.0"/>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||||
|
<map MAP_XML_VERSION="1.0">
|
||||||
|
<entry key="omeroConnectionSpeed" value="0"/>
|
||||||
|
<entry key="omeroServer" value="nightshade.openmicroscopy.org:4064,outreach.openmicroscopy.org:4064,idr.openmicroscopy.org:4064,demo.openmicroscopy.org:4064"/>
|
||||||
|
<entry key="omeroTransferEncrypted" value="true"/>
|
||||||
|
</map>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||||
|
<map MAP_XML_VERSION="1.0"/>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
|
||||||
|
<map MAP_XML_VERSION="1.0"/>
|
|
@ -9,7 +9,7 @@ else:
|
||||||
|
|
||||||
vnc_socket = os.path.join(os.getenv('HOME'), '.vnc', 'socket')
|
vnc_socket = os.path.join(os.getenv('HOME'), '.vnc', 'socket')
|
||||||
c.ServerProxy.servers = {
|
c.ServerProxy.servers = {
|
||||||
'desktop': {
|
'Desktop': {
|
||||||
'command': [
|
'command': [
|
||||||
'/opt/conda/bin/websockify',
|
'/opt/conda/bin/websockify',
|
||||||
'-v',
|
'-v',
|
||||||
|
|
Loading…
Reference in New Issue