jappavoo / bu-cs-book-dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bu-cs-book-dev

This is the container image source for the BU Computer Science Jupyter Book infrastructure.

  1. This repository support running the image locally (fetching it from dockerhub if needed)
  2. Building the image from scratch
  3. pull and pushing from the dockerhub

Note: This container does not have any particular book within it. You must clone or copy whatever particular book you want into it. At the bottom you will find a url that should trigger a clone of the Under the Covers - The Secret Life of Software into it.

Getting started

Remote use

This container image is available on the MOC operate-first JupyerHub service. To use the container on this service login and start a server with the BU CS Jupyter Book image. You can use this link to directly start it if you don't already have a server running:
https://jupyterhub-opf-jupyterhub.apps.smaug.na.operate-first.cloud/hub/spawn?bu-cs-jupyter-book:latest

Prerequisites for local use

  1. Intel based computer
  2. Docker installed : https://www.docker.com
  3. The ability to open a terminal and run make and git in the terminal

Downloading a copy of this repository

  1. Open a terminal
  2. clone this respository using git

git clone https://github.com/jappavoo/bu-cs-book-dev

$ git clone https://github.com/jappavoo/bu-cs-book-dev.git
Cloning into 'bu-cs-book-dev'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 75 (delta 28), reused 64 (delta 21), pack-reused 0
Unpacking objects: 100% (75/75), 19.31 KiB | 420.00 KiB/s, done.
$

The rest of the instructions assume that you are in the newly created directory of the above command. To get into this directory you need to do the following:

cd bu-cs-book-dev

$ cd bu-cs-book-dev/
$

starting and connecting to the jupyter server

To start a local container from the image:

make nb

$ make lab
docker run -it --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "/Users/jonathan":"/opt/app-root/src" -p 2222:22 quay.io/jappavoo/bu-cs-book-dev:latest 
/usr/local/bin/start-notebook.sh: running hooks in /usr/local/bin/start-notebook.d

... 
    To access the server, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/jpserver-9-open.html
    Or copy and paste one of these URLs:
        http://672be921b600:8888/lab?token=ceadc63909b2eb8b8de5aa7c604480fef3bf2612d34e3ae3
     or http://127.0.0.1:8888/lab?token=ceadc63909b2eb8b8de5aa7c604480fef3bf2612d34e3ae3

There will be a lot of information displayed in response to this command. But all we care about is the url on the last line. You should be able to paste it into your web browser and then it will connect the the jupyter-server running within it.

building the container locally from scratch

make build

more info on what you can do

make

Useful links:

About

License:MIT License


Languages

Language:Shell 39.4%Language:Dockerfile 34.3%Language:Makefile 22.4%Language:Assembly 3.9%