Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove apt.txt and refactor Dockerfile #13

Merged
merged 7 commits into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
FROM jupyter/base-notebook:python-3.7.6

FROM jupyter/base-notebook

USER root

RUN apt-get -y update \
&& apt-get install -y dbus-x11 \
firefox \
xfce4 \
xfce4-panel \
xfce4-session \
xfce4-settings \
xorg \
xubuntu-icon-theme
RUN apt-get -y update > /dev/null \
&& apt-get -y upgrade > /dev/null \
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
&& apt-get -y install \
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
dbus-x11 \
firefox \
xfce4 \
xfce4-panel \
xfce4-session \
xfce4-settings \
xorg \
xubuntu-icon-theme \
> /dev/null \
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
# chown $HOME to workaround that the xorg installation creates a
# /home/jovyan/.cache directory owned by root
&& chown -R $NB_UID:$NB_GID $HOME \
&& rm -rf /var/lib/apt/lists/*

# Remove light-locker to prevent screen lock
# Install TurboVNC (https://github.com/TurboVNC/turbovnc)
ARG TURBOVNC_VERSION=2.2.6
RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc_${TURBOVNC_VERSION}_amd64.deb && \
apt-get install -y -q ./turbovnc_${TURBOVNC_VERSION}_amd64.deb && \
apt-get remove -y -q light-locker && \
rm ./turbovnc_${TURBOVNC_VERSION}_amd64.deb && \
ln -s /opt/TurboVNC/bin/* /usr/local/bin/

# apt-get may result in root-owned directories/files under $HOME
RUN chown -R $NB_UID:$NB_GID $HOME
RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc.deb \
&& apt-get install -y ./turbovnc.deb > /dev/null \
# remove light-locker to prevent screen lock
&& apt-get remove -y light-locker > /dev/null \
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
&& rm ./turbovnc.deb \
&& ln -s /opt/TurboVNC/bin/* /usr/local/bin/

ADD . /opt/install
COPY jupyter_desktop /opt/install/jupyter_desktop
COPY setup.py MANIFEST.in README.md LICENSE /opt/install/
RUN fix-permissions /opt/install

USER $NB_USER
RUN cd /opt/install && \
conda env update -n base --file environment.yml
RUN cd /opt/install \
&& mamba install -y websockify \
&& pip install -e .
8 changes: 0 additions & 8 deletions apt.txt

This file was deleted.

8 changes: 0 additions & 8 deletions environment.yml

This file was deleted.

4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
'desktop = jupyter_desktop:setup_desktop',
]
},
install_requires=['jupyter-server-proxy>=1.4.0'],
install_requires=[
'jupyter-server-proxy>=1.4.0',
],
include_package_data=True,
keywords=["Interactive", "Desktop", "Jupyter"],
license="BSD",
Expand Down