Giter VIP home page Giter VIP logo

rpi-jupyter-conda's Introduction

rpi-jupyter-conda

Minimal Jupyter Notebook for Raspberry Pi with Python 3.6.6

To have your own Jupyter Notebook Server running 24/7 on Raspberry Pi. If connected to your router, with port forwarding and DDNS set up, you can carry out your Jupyter tasks on the move.

This is a minimal Jupyter notebook server with Python 3.6.6 installed with Berryconda3 and resin/rpi-raspbian:latest as base image. JupyterLab is also installed. To use Lab interface just replace tree with lab in notebook URL.

  • Minimal function Jupyter notebook 5.2.x installation
  • Conda based Python 3.6.6 for Raspberry pi
  • Unprivileged user jovyan in group users (gid=100) with ownership over /home/jovyan and /opt/conda
  • Tini 0.18.0 as the container entrypoint

These packages are installed:

locales ca-certificates wget bzip2 vim fonts_liberation

Installing

Of course, first you will need to install Docker on your Raspberry Pi:

curl -sSL https://get.docker.com | sh

Then pull the container:

docker pull movalex/rpi-jupyter-conda:latest

Run in detached mode:

docker run -d -p 8888:8888 movalex/rpi-jupyter-conda

Now you can access your notebook at http://<docker host IP address>:8888

Configuration

The image already has following configuration, so 'open browser' option is disabled and your notebook is accessible from any ip:

  • c.NotebookApp.open_browser = False
  • c.NotebookApp.ip = '*'

If you would like to change configuration, create your own jupyter_notebook_config.py (or use sample file from this repository), place it to $HOME/.jupyter folder and link it to docker volume. Run the following to map a local config file to the container:

docker run -it -p 8888:8888 -v <path to your config file>:/home/jovyan/.jupyter/jupyter_notebook_config.py movalex/rpi-jupyter-conda

To add a password for your notebook, you can alter c.NotebookApp.password = '' section in config file. You can add password later after jupyter is installed. Just run

from IPython.lib import passwd
passwd()

in Python Jupyter notebook to generate new password, and add output as a value of c.NotebookApp.password.

The notebook will run under unpriviledged user jovyan (uid=1000) with ownership of /home/jovyan and opt/conda. If you want to mount your default working directory on the host to preserve work even when notebook is not running or destroyed, use additional -v option:

docker run -it docker run -it -p <host port>:<dest port> -v <path to your config file>:/home/jovyan/.jupyter/jupyter_notebook_config.py -v /some/host/folder/for/work:/home/jovyan/work  movalex/rpi-jupyter-conda

Login to bash session

To login a bash session use:

docker exec -it <container id> /bin/bash

If you want to start bash session with root accesss so you could do more, use this command:

docker exec -it -u 0 <container id> /bin/bash

Using Python 2 kernel

This Docker container has only Python 3 kernel. If you still need Python2, you can add Python2 Conda environment and add it to Jupyter with ipykernel module. But since this module requires gcc and libzmq3, you'll need to install them first in priviledged bash session.

IMHO better solution would be using this datascience container with all necessary libraries (and many others) pre-installed. Here you can read how to add Python2 kernel to Jupyter Notebook.

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

rpi-jupyter-conda's People

Contributors

movalex avatar mkjiang avatar

Stargazers

 avatar Edward Burgin avatar  avatar Andras Demeter Fekete avatar redtree0 avatar DmitrII Gerasimenko avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.