The Littlest JupyterHub (TLJH) distribution helps you to provide Jupyter Notebooks to 1-100 users on a single server.
-
Clone this Repo
git clone https://github.com/imSrbh/TLJH_Docker.git
-
Build a docker image that has a functional systemd in it.
docker build -t tljh-systemd . -f Dockerfile
do not forget the period (.)
- Run a docker container with the image in the background, while bind mounting your TLJH repository under /srv/src.
docker run \
--privileged \
--detach \
--name=tljh-dev \
--publish 12000:80 \
--mount type=bind,source=$(pwd),target=/srv/src \
tljh-systemd
- Get a shell inside the running docker container.
docker exec -it tljh-dev /bin/bash
- Run the bootstrapper from inside the container (see step above): The container image is already set up to default to a dev install, so it’ll install from your local repo rather than from github.
python3 /srv/src/bootstrap/bootstrap.py --admin admin:password
- You should be able to access the JupyterHub from your browser now at
http://localhost:12000
. Congratulations, you are set up to develop TLJH!
If you want to add more user, from admin panal you can create user and when user will be signing in the password of his choice which he uses at that first time sign in, that will will be the password for that user.
Inside the container /home
-> You can see the user as jupyter-abc
, jupyter-xyz
root@277863f1ab7e:/home# ls
jupyter-abc jupyter-xyz
Detailed info : https://github.com/jupyterhub/the-littlest-jupyterhub
- Clone the repo
git clone https://github.com/imSrbh/TLJH_Docker.git
- Create the container for service
docker-compose up --build -d
- Run the container
saurabh@srbh:~/Git/TLJH_Docker$ sudo docker run \
--privileged \
--detach \
--name=tljh-dev_web \
--publish 12000:80 \
--mount type=bind,source=$(pwd),target=/srv/src \
tljh_docker_web
- Run in interactive mode
sudo docker exec -it tljh-dev_web /bin/bash
- Setup admin password
python3 /srv/src/bootstrap/bootstrap.py --admin admin:password
-
See the JupyterHub in browser goto
localhost:12000
-
script file(.sh)
-
Multi admin setup bash script.
admin_setup.sh(This is not mounted yet with the docker-compose )
-
User setup bash script.
-
-
Basic Docker-Compose file
-
We can modify it's html also inside the running container
/opt/tljh/hub/share/jupyterhub/templates#
.