Sign inSign up

facciolo/mva-2018

By facciolo

•Updated over 8 years ago

Jupyter environment for the MVA 2018 course: "Large-scale geospatial data exploitation"

Image
0

233

facciolo/mva-2018 repository overview

This is the docker image used to set up the jupyter server for the course "Large-scale geospatial data exploitation"

The same image is used for setting up the jupyterhub server⁠ and for local installations, which can be installed from dockerhub⁠

Docker Status

⁠Jupyterhub server

⁠Build the image

Run this line in the directory containing the Dockerfile

docker build -t mva-2018 .
⁠Run the image on the public host's port 2018

This command maps the internal port 8000 to the host's port 2018 and maps the /home and /etc directories to /home/facciolo/cours_mva_home/ and /home/facciolo/cours_mva_admin/etc/

docker run --rm -v /home/facciolo/cours_mva_home/:/home \
                -v /home/facciolo/cours_mva_admin/etc/:/etc \
	    --workdir /home -p 2018:8000 -t -i facciolo/mva-2018
⁠Run the jupyterhub server (SSL) within the docker container

The jupyterhub server runs an https server. To obtain a certificate follow the instructions in the section "Getting the certificate".

cd /home; 
jupyterhub --ssl-key /etc/letsencrypt/live/menthe.ovh.hw.ipol.im/privkey.pem  \
           --ssl-cert /etc/letsencrypt/live/menthe.ovh.hw.ipol.im/fullchain.pem &
⁠To create the users (the current user list with passwords is in genusers.list)
for i in `seq 100`; do pw=`pwgen -B -1`; echo "useradd -m -p \$( openssl passwd -1 $pw ) student$i" >> genusers.list; done

# run the script: genusers.list

# set permissions of homes to: 750 
⁠Generating the certificate

install certbot

https://community.letsencrypt.org/t/how-to-get-a-lets-encrypt-certificate-while-using-cloudflare/6338⁠

run a temporary http-server for the certificate creation/renewal

https://www.npmjs.com/package/http-server⁠

⁠Local jupyter server runngin on http://localhost:2018⁠

First create the shared directory in the host machine

mkdir ~/couse_mva_satellite       
# make it writable by the docker use
chmod o+rwx ~/couse_mva_satellite

To download and lauch the docker instance call:

# launch the VM. Type ctrl-D to exit the container
docker run --rm  \
    -v ~/couse_mva_satellite:/home/student  \
    -p 2018:8000  --workdir /home/student  -t -i  facciolo/mva-2018  \
    jupyter notebook --port=8000 --ip=* --allow-root --NotebookApp.token=''

# connect to    http://localhost:2018

Tag summary

Content type

Image

Digest

Size

1.8 GB

Last updated

over 8 years ago

docker pull facciolo/mva-2018