GithubHelp home page GithubHelp logo

zhiyuli / geospatial-modeling-course-jupyter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wenzeslaus/geospatial-modeling-course-jupyter

0.0 1.0 1.0 201 KB

tmpnb runtime and Jupyter Notebooks for NCSU Geospatial Modeling and Analysis course

License: BSD 2-Clause "Simplified" License

Dockerfile 0.33% Jupyter Notebook 99.67%

geospatial-modeling-course-jupyter's Introduction

tmpnb runtime and Jupyter Notebooks for NCSU Geospatial Modeling and Analysis course

Binder

Prepare GRASS GIS image

Build it to have it locally:

docker build -t grass-gis-notebook github.com/wenzeslaus/geospatial-modeling-course-jupyter

In case you plan to modify the code, first download it and then build it:

docker build -t grass-gis-notebook .

Run it to test it:

docker run -it --rm -p 8888:8888 grass-gis-notebook

Run tmpnb

Generate tokens:

export TOKEN=$( head -c 30 /dev/urandom | xxd -p )
export USER_TOKEN=$( head -c 30 /dev/urandom | xxd -p )
echo $USER_TOKEN

Run the proxy:

docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=proxy \
    jupyter/configurable-http-proxy --default-target http://127.0.0.1:9999

Run tmpnb:

docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=tmpnb \
    -v /var/run/docker.sock:/docker.sock jupyter/tmpnb \
    python orchestrate.py --log-to-stderr --logging=debug \
    --use-tokens=False --image='grass-gis-notebook' \
    --command="start-notebook.sh \"--NotebookApp.base_url={base_path} --ip=0.0.0.0 --port {port} --NotebookApp.trust_xheaders=True --NotebookApp.token=$USER_TOKEN\""

Generate the notebooks from HTML

for F in .../geospatial-modeling-course/grass/*.html;
do
    python .../geospatial-modeling-course/doc2nb.py \
        --grass grass \
        --gisdbase "/home/jovyan/grassdata" \
        --location "nc_spm_08_grass7" --mapset "user1"\
        $F `basename -s .html $F`.ipynb;
done;

geospatial-modeling-course-jupyter's People

Contributors

wenzeslaus avatar

Watchers

James Cloos 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.