FROM resin/rpi-raspbian:jessie-20170531 # Set the variables ENV DEBIAN_FRONTEND noninteractive WORKDIR /root # Install packages necessary for compiling python RUN apt-get update && apt-get install -y \ build-essential \ libncursesw5-dev \ libgdbm-dev \ libc6-dev \ zlib1g-dev \ libsqlite3-dev \ tk-dev \ libssl-dev \ openssl \ curl \ vim \ git \ mc \ htop \ python \ python-dev \ python-pip \ libncurses5-dev \ python-pillow RUN sudo echo "Europe/Berlin" > /etc/timezone RUN sudo dpkg-reconfigure -f noninteractive tzdata # Update pip and install jupyter RUN pip install --upgrade pip RUN pip install readline notebook==5.2.0 ipywidgets path.py requests cython RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension RUN apt-get install -y python-numpy python-scipy # Configure jupyter # we run this manually after mounting /root/.jupyter # RUN jupyter notebook --generate-config # RUN mkdir notebooks # RUN sed -i "/c.NotebookApp.open_browser/c c.NotebookApp.open_browser = False" /root/.jupyter/jupyter_notebook_config.py \ # && sed -i "/c.NotebookApp.ip/c c.NotebookApp.ip = '*'" /root/.jupyter/jupyter_notebook_config.py \ # && sed -i "/c.NotebookApp.notebook_dir/c c.NotebookApp.notebook_dir = '/root/notebooks'" /root/.jupyter/jupyter_notebook_config.py # change to letscode.00 # sudo vi /opt/fast/jupyter/config_root/jupyter_notebook_config.py VOLUME /root/notebooks EXPOSE 8888 CMD ["jupyter", "notebook", "--allow-root"] HEALTHCHECK --interval=10s CMD curl -sS --fail http://localhost:8888 || exit 1 # python-pip # install ipython2 kernel into jupyter # RUN pip install --upgrade pip # RUN python2 -m pip install ipykernel # RUN python2 -m ipykernel install --user # this version will be used by matrix python bindings RUN pyversions -d RUN git clone https://github.com/hzeller/rpi-rgb-led-matrix.git /matrix WORKDIR /matrix RUN sed -i "s/=regular/=adafruit-hat-pwm/g" lib/Makefile # for C++-demos RUN make -C examples-api-use # for python interface RUN cd bindings/python && make build-python install-python COPY *.py / # CMD python -u /pixelreceiver.py > /pixel/receive.log & jupyter notebook --allow-root CMD jupyter notebook --allow-root