Friday, August 19, 2022

Jupyter_project Software As A Service (Jupyter notebook on browser from anywhere anytime)


The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualisations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modelling, data visualisation, machine learning, and much more.


FROM centos:7
RUN curl https://xpra.org/repos/CentOS/xpra.repo -o /etc/yum.repos.d/xpra.repo && yum install epel-release openssh-server 
net-tools xauth firefox python-websockify xpra  -y && /usr/sbin/sshd-keygen &&  sed -i 's/X11UseLocalhost yes/X11UseLocalhost no/' 
/etc/ssh/sshd_config  &&  /usr/sbin/sshd -f /etc/ssh/sshd_config  && echo '/usr/sbin/sshd -f /etc/ssh/sshd_config' >> /root/.bashrc 
&& dbus-uuidgen > /etc/machine-id

#CMD ["xpra", "start", "--bind-tcp=0.0.0.0:3333", "--html=on","--start-child=firefox", "--daemon=no", "--systemd-run=no"]
RUN yum install python36 python3-pip -y && pip3 install jupyter

WORKDIR /book
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
#VOLUME /book



version: '3'
volumes:
  book_data:
services:
  jupybook:
    image: "booki:v3"
    ports:
      - 8888:8888
    volumes:
      - /tmp/.X11-unix/:/tmp/.X11-unix/
      - book_data:/book
    environment:
      DISPLAY: $DISPLAY