Git Product home page Git Product logo

nengo-scipy-jupyter's Introduction

Nengo running on a Jupyter Notebook with Scientific Python Stack

What it gives you

  • Jupyter Notebook 4.3
  • Scientific Python Stack
  • Python 3
  • Python 2
  • Nengo 2.3.1

Basic Usage

After installing Docker, the following command downloads an image from DockerHub and starts a container using the image jjaguayo/nengo-scipy-jupyter. The image has a Jupyter notebook server, listening for HTTP connections on port 8888, capable of running Nengo models.

    docker run -it --restart=always -v <absolute-path-on-host>:/home/jovyan/work -p 8888:8888 jjaguayo/nengo-scipy-jupyter

Remember to replace <absolute-path-on-host> with the absolute path to the directory you want to share with the container.

This link gives more information on the Scientific Python Stack (provided by Jupyter) used as a base for this Docker image.

This link gives more information on Nengo, a Python library for building and simulating large-scale brain models.

Stopping a running container

The command above starts a restartable container that restarts if the application exits.

If you want to stop a running container, two commands can be used, docker ps and docker stop. The first command gives you a list of running containers and their ids. The second command stops the running container given the container id. For example, the following helps you find the id of the running container you want to stop (using docker ps) and the second command stops the running container.

    docker ps
    docker stop <container_id>

Running a non-restartable container

The option --restart=always indicates to Docker that the container should be restarted if the container is stopped or if the application exits.

If the user wants to change this behavior having the container simply exit and not restart, replace the --restart option with --rm. For example, the following will run a container and not restart it if the application ends or the container is stopped.

    docker run -it --rm -v <absolute-path-on-host>:/home/jovyan/work -p 8890:8888 jjaguayo/nengo-scipy-jupyter

Sharing a filesystem between host and container

Data stored in the jupyter notebook can be shared with a directory in your host using the -v option. For example, the following shares the data stored in the jupyter notebook with the directory <absolute-path-on-host> on my machine hosting the container.

    docker run -it --restart=always -v <absolute-path-on-host>:/home/jovyan/work -p 8888:8888 jjaguayo/nengo-scipy-jupyter

Remember to replace <absolute-path-on-host> with the absolute path to the directory you want to share with the container.

Using a non-default port

It is possible that port 8888 on your host machine is being used. If so, a different host port can be used by changing the first number in the -p option. For example, the following uses host port 8890 mapping it to port 8888 in the container.

    docker run -it --restart=always -v <absolute-path-on-host>:/home/jovyan/work -p <available-host-port-id>:8888 jjaguayo/nengo-scipy-jupyter

Remember to change <available-host-port-id> to an accessible port id on the host.

Building a local image

If you do not care to download the image from DockerHub, clone this repository and run the following from the directory containing the file Dockerfile.

    docker build -t <your_local_build_name> .
    docker run -it --restart=always -p 8888:8888 <your_local_build_name>

The first command builds an image called <your_local_build_name> and the second command runs it in a restartable container.

Connecting to Jupyter hub

When starting the hub, a URL is provided by the container app. Copy and paste the URL into a browser to connect to the hub.

Installing Docker

If you have not installed Docker, the following links provide instructions for installing on

Note that there are minimum requirements for each platform so check the Docker documentation for more information on what is supported.

nengo-scipy-jupyter's People

Contributors

jjaguayo avatar

Watchers

 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.