Commit Graph

898 Commits

Author SHA1 Message Date
Graham Dumpleton
13be336fcd Add missing label to config map in OpenShift template. 2018-02-15 14:43:30 +11:00
Graham Dumpleton
770007bb10 Use NB_UID for USER statement in Dockerfile so deployment platform can verify that image doesn't run as root. 2018-02-15 11:11:32 +11:00
Graham Dumpleton
cd86d62fa7 Add README for OpenShift example. 2018-02-14 17:09:44 +11:00
Graham Dumpleton
75108f99fd Generate password from OpenShift template if none is supplied. 2018-02-14 14:12:08 +11:00
Graham Dumpleton
2a7f659664 Add example templates for deploying notebooks to OpenShift. 2018-02-14 12:23:06 +11:00
Peter Parente
c54800018c Merge pull request #545 from chriszs/lab-31
Upgrade to the first JupyterLab beta v0.31
2018-02-04 14:28:34 -05:00
Chris Zubak-Skees
8cbf385b6d Upgrade ipywidgets in scipy for compatibility with 0.31 jupyterlab version 2018-02-04 13:19:11 -05:00
Chris Zubak-Skees
27cf7035ec Fix to check dict status code response in test_container_options 2018-02-04 13:01:28 -05:00
Peter Parente
b214741486 Merge pull request #544 from Bidek56/master
Fixing PYTHONPATH in base-notebook/start.sh
2018-02-04 12:58:17 -05:00
Chris Zubak-Skees
7c68f9cd4a Upgrade to the first JupyterLab beta v0.31 2018-02-04 00:41:30 -05:00
Bidek56
d28657d7b9 Added PYTHONPATH to sudo 2018-02-03 16:43:16 -05:00
Peter Parente
9089b66a98 Merge pull request #539 from clkao/jupterhub-lab
jupyterhub-lab support will be enabled if $JUPYTER_ENABLE_LAB is set.
2018-01-31 21:49:37 -05:00
Min RK
29b68cd9e1 Merge pull request #541 from cam72cam/cam72cam-chown-home
Support provisioned storage with incorrect permissions
2018-01-31 15:18:21 +01:00
Christian Mesh
272476e2d7 Gate chown /home/$NB_USER behind $CHOWN_HOME 2018-01-31 09:05:01 -05:00
Christian Mesh
b4d2d6f583 Support provisioned storage with incorrect permissions
I ran into an issue when trying to get this to work with a NFS server which I did not have direct control over (EFS).  As part of the PersistentVolumeClaim, there is no easy way to set the UID and GID of the created directory.on the networked FS.

My only concern with this chown is that some user out there might be running jupyterhub in an odd configuration where $NB_USER is not supposed to have these exact permissions on the storage.  I think this is quite unlikely, but it is worth mentioning. 

I chronicled my experiences with working around this issue and setting up z2jh on EFS in https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/421 with @yuvipanda.
2018-01-31 08:51:52 -05:00
Chia-liang Kao
94657c2616 rework to use JUPYTER_ENABLE_LAB for both notebook and hub 2018-01-31 01:16:49 +08:00
Chia-liang Kao
ec2f79487f Enable jupyterhub-lab support. 2018-01-28 16:26:19 +08:00
Peter Parente
27ba573645 Merge pull request #529 from nbonnotte/master
Add /bin to sudo secure_path
2018-01-18 23:00:06 -05:00
Bonnotte, Nicolas
c6c6819a6e Add /bin to sudo secure_path 2018-01-18 17:51:06 +01:00
Peter Parente
cf1a3aa8fb Merge pull request #534 from terhorst/patch-1
Update Dockerfile to install r-hexbin
2018-01-14 22:54:30 -05:00
Jonathan Terhorst
9dfacf4419 Add correct command :) 2018-01-14 11:03:15 -05:00
Jonathan Terhorst
97170690c3 Update Dockerfile to install r-hexbin
Fixes #532
2018-01-14 10:42:36 -05:00
Peter Parente
400c69639e Merge pull request #525 from parente/fix-sudo-path
Append /opt/conda/bin to the sudo secure_path
2018-01-05 00:38:14 -05:00
Peter Parente
a3cfda28da Verify path prefix in test 2018-01-04 22:51:16 -05:00
Peter Parente
6fa67cc500 Append $CONDA_DIR/bin to sudo secure_path
Retain behavior when su was used instead
2018-01-04 00:09:07 -05:00
Peter Parente
2c80cf3537 Merge pull request #509 from tlinnet/master
Fix for granting SUDO to jovyan user and run bash commands.
2017-12-30 13:12:04 -05:00
Peter Parente
ac82cac7e4 Fix missing @ in version 2017-12-29 20:19:09 -05:00
Peter Parente
3b5175b452 Fix missing jupyterlab-manager version 2017-12-29 19:58:19 -05:00
Peter Parente
fb01654930 Fix test to use bash for multiple commands 2017-12-29 19:37:07 -05:00
Peter Parente
c560907ea3 Fix missing env vars (inc. PATH) in some cases
* Refactor to use sudo to become jovyna when the
  container starts as root
* Retain all environment variables when becoming
  jovyan
* Handle start.sh without additional commands when
  launching a container as NB_USER too
2017-12-29 19:22:42 -05:00
Peter Parente
b928811d23 Minor README touchups 2017-12-29 11:38:53 -05:00
Troels Schwarz-Linnet
0766b5f005 This is to fix running SUDO as eihter the jovyan user or root.
Please refer to alias, in bottom of commit.

> dbn
Execute the command: jupyter notebook

> dbn bash
jovyan@eedcc93a837d:~$

> dbn start.sh
Execute the command:
exit

> dbnr
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Execute the command: jupyter notebook
Running as root is not recommended. Use --allow-root to bypass.
exit

> dbnr bash
root@893cb78b8c9c:~#

> dbnr start.sh
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Execute the command:
No arguments supplied
HOSTNAME=d45c52e788b7
TERM=xterm
SHELL=/bin/bash
NB_USER=jovyan
LC_ALL=en_US.UTF-8
PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_=/usr/bin/env
MINICONDA_VERSION=4.3.30
PWD=/home/jovyan
LANG=en_US.UTF-8
HOME=/home/jovyan
SHLVL=2
LANGUAGE=en_US.UTF-8
no_proxy=*.local, 169.254/16
DEBIAN_FRONTEND=noninteractive
CONDA_DIR=/opt/conda
NB_GID=100
NB_UID=1000
root@d45c52e788b7:~#

> dbnrs
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Granting jovyan sudo access
Execute the command: jupyter notebook
Copy/paste this URL into your browser when you connect for the first time, ....

> dbnrs bash
root@f293dce949db:~#

> dbnrs start.sh
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Granting jovyan sudo access
Execute the command:
No arguments supplied
HOSTNAME=d0cd57ea32e2
SHELL=/bin/bash
TERM=xterm
LC_ALL=en_US.UTF-8
USER=jovyan
SUDO_USER=root
SUDO_UID=0
USERNAME=jovyan
MAIL=/var/mail/jovyan
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
PWD=/home/jovyan
LANG=en_US.UTF-8
SHLVL=1
SUDO_COMMAND=/bin/bash -c env; PATH=$PATH; bash
HOME=/home/jovyan
LANGUAGE=en_US.UTF-8
LOGNAME=jovyan
SUDO_GID=0
_=/usr/bin/env
jovyan@d0cd57ea32e2:~$

> dbns
Container must be run as root to grant sudo permissions
Execute the command: jupyter notebook
Copy/paste this URL in..

> dbns bash
jovyan@ce5c2491fa32:~$

> dbns start.sh
Container must be run as root to grant sudo permissions
Execute the command:
exit

###### Build user setup
docker build -t $USER/base-notebook -f Dockerfile .

# Normal, dbn: docker-base-notebook
alias dbn='docker run -ti --rm -p 8888:8888 -v "$PWD":/home/jovyan/work --name base-notebook $USER/base-notebook'
# Root, dbnr: dbn with root
alias dbnr='docker run -ti --rm -p 8888:8888 --user root -v "$PWD":/home/jovyan/work --name base-notebook $USER/base-notebook'
# Jovyan SUDO, dbnr: dbn with SUDO for jovyan
alias dbnrs='docker run -ti --rm -p 8888:8888 --user root -e GRANT_SUDO=yes -v "$PWD":/home/jovyan/work --name base-notebook $USER/base-notebook'
# Root, fail to sudo for jovyan.
alias dbns='docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes -v "$PWD":/home/jovyan/work --name base-notebook $USER/base-notebook'
2017-12-29 11:38:53 -05:00
Troels Schwarz-Linnet
412a17b884 Fix for granting SUDO to jovyan user and run bash commands.
Test image builded with:
> docker build -t $USER/base-notebook -f Dockerfile .

> docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root jupyter/base-notebook:033056e6d164 bash
root@84db8819258d:~#

docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root $USER/base-notebook bash
> root@c23f1fd7d279:~#

> docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root jupyter/base-notebook:033056e6d164 start.sh
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Granting jovyan sudo access
Execute the command:
HOSTNAME=a231202e6d1a
TERM=xterm
SHELL=/bin/bash
NB_USER=jovyan
LC_ALL=en_US.UTF-8
USER=jovyan
MAIL=/var/mail/jovyan
PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MINICONDA_VERSION=4.3.30
PWD=/home/jovyan
LANG=en_US.UTF-8
GRANT_SUDO=yes
HOME=/home/jovyan
SHLVL=1
LANGUAGE=en_US.UTF-8
no_proxy=*.local, 169.254/16
LOGNAME=jovyan
DEBIAN_FRONTEND=noninteractive
CONDA_DIR=/opt/conda
NB_GID=100
NB_UID=1000
_=/usr/bin/env
tlinnet@linmac:base-notebook$

> docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root $USER/base-notebook start.sh
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Granting jovyan sudo access
Execute the command:
No arguments supplied
HOSTNAME=364e5fc77224
SHELL=/bin/bash
TERM=xterm
LC_ALL=en_US.UTF-8
USER=jovyan
SUDO_USER=root
SUDO_UID=0
USERNAME=jovyan
MAIL=/var/mail/jovyan
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
PWD=/home/jovyan
LANG=en_US.UTF-8
SHLVL=1
SUDO_COMMAND=/bin/bash -c env; PATH=$PATH; bash
HOME=/home/jovyan
LANGUAGE=en_US.UTF-8
LOGNAME=jovyan
SUDO_GID=0
_=/usr/bin/env
jovyan@364e5fc77224:~$

> docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root jupyter/base-notebook:033056e6d164 start.sh echo hello
tlinnet@linmac:base-notebook$ docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root jupyter/base-notebook:033056e6d164 start.sh echo hello
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Granting jovyan sudo access
Execute the command: echo hello
hello
tlinnet@linmac:base-notebook$

> docker run -ti --rm -p 8888:8888 -e GRANT_SUDO=yes --user root $USER/base-notebook start.sh echo hello
Set username to: jovyan
usermod: no changes
Set jovyan GID to: 100
Granting jovyan sudo access
Execute the command: echo hello
hello
tlinnet@linmac:base-notebook$
2017-12-29 11:38:53 -05:00
Troels Schwarz-Linnet
e97bb8ab94 Added list to quickly find README of each image, when reading the main README 2017-12-29 11:38:53 -05:00
Troels Schwarz-Linnet
ef4c304544 Adding info how to mount local directory into 'work' directory 2017-12-29 11:38:53 -05:00
Troels Schwarz-Linnet
8a527c97e9 Improved README, with explaining 2 methods to start the Jupyter stacks 2017-12-29 11:38:53 -05:00
jakirkham
0b3ec811c9 Merge pull request #520 from codles/patch-2
Update Julia version in README to match script
2017-12-25 19:19:10 -08:00
Robert Luke
d98e1f7aad Update Julia version in README to match script 2017-12-26 13:23:34 +11:00
Peter Parente
db3ee82ad0 Merge pull request #518 from ellisvalentiner/patch-1
Julia v0.6.2
2017-12-18 22:21:49 -05:00
Ellis Valentiner
80f1cb9e35 Merge branch 'patch-1' of github.com:ellisvalentiner/docker-stacks into patch-1 2017-12-18 12:51:50 -05:00
Ellis Valentiner
db8f4ae0c1 Fix URL domain 2017-12-18 12:51:44 -05:00
Ellis Valentiner
740cb1e52d Merge branch 'master' into patch-1 2017-12-18 08:48:54 -05:00
Ellis Valentiner
4b417f279f Merge branch 'master' into patch-1 2017-12-18 08:46:27 -05:00
Ellis Valentiner
3c19b7499d Julia v0.6.2 2017-12-18 08:45:14 -05:00
Ellis Valentiner
e98aeb0edc Add sha256 check and use JULIA_VERSION env var 2017-12-18 08:45:13 -05:00
Ellis Valentiner
219ab91e63 julia 0.6.0 2017-12-18 08:45:13 -05:00
Peter Parente
e5c5a7d3e5 Merge pull request #508 from parente/406-integration-tests
pytest integration tests
2017-12-18 08:39:42 -05:00
Peter Parente
706194f7c0 Update jupyterlab hub ext to 0.7.0 2017-12-17 12:03:58 -05:00
Peter Parente
b45fe72323 Updating jupyterlab to 0.30.* 2017-12-17 11:41:19 -05:00
Peter Parente
22adf3eb59 Fix make test-reqs naming 2017-12-16 23:13:00 -05:00