Giter Club home page Giter Club logo

how-would-repronim-1's Introduction

This is the companion notebook to "How would ReproNim..." Volume 1.

The notebook can be run if Docker is installed and the Python packages datalad, datalad_container, and jupyter are installed (as well as the Jupyter bash kernel).

To ease installation issues, the notebook can also be run from a Docker container. An empty work directory must be mounted in the container at the same location as on the host, and the Docker socket must be available in the container as well. So this will work:

mkdir work

cd work

docker run \
       -p 8888:8888 \
       -v /var/run/docker.sock:/var/run/docker.sock \
       -v `pwd`:`pwd` \
       repronim/how-would-1:latest

The casual reader may stop reading now; the interested reader can find information about these caveats below.

The notebook launches containers; running the notebook in a container means running containers from a container. Arguably the easiest way of doing this is by letting the container access Docker on the host; this is done by making /var/run/docker.sock available in the container; hence -v /var/run/docker.sock:/var/run/docker.sock.

The (processing) containers need access to data to work on. Usually this is done by mounting a directory on the host (where Docker is running and from which containers are launched) to the processing container, but in this case we are trying to mount a directory that exists in the notebook container, and the host doesn't have access to this filesystem. We solve this by making sure there is a directory that exists in the same place on the notebook container and the host. The notebook container tells Docker that it wants to mount that directory in the processing container, and since the directory exists in the same place on the host, Docker can find it and mount it. Hence -v `pwd`:`pwd` .

We require that the working directory be empty to avoid overwriting data.

how-would-repronim-1's People

Contributors

chaselgrove 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.