Skip to content

Commit

Permalink
Fix bug introduced in notebook 5.7.0 #721
Browse files Browse the repository at this point in the history
Update jupyter_notebook_config.py to fix bug introduced in notebook 5.7.0 #721
jupyter/docker-stacks#721
  • Loading branch information
elswork committed Oct 16, 2018
1 parent b1cbae3 commit 21e2f5e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ RUN pip3 --no-cache-dir install \
#sklearn \
#pandas \
&& \
python3 -m ipykernel.kernelspec
python3 -m ipykernel.kernelspec

COPY jupyter_notebook_config.py /root/.jupyter/

# Copy sample notebooks.
COPY notebooks /notebooks
Expand All @@ -37,4 +39,4 @@ EXPOSE 6006 8888

WORKDIR /notebooks

CMD jupyter lab --ip=0.0.0.0 --no-browser --allow-root
CMD jupyter lab --ip=* --no-browser --allow-root
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
NAME ?= elswork/tf-jupyterlab


start:
docker run -d -p 8888:8888 -p 0.0.0.0:6006:6006 --restart=unless-stopped $(NAME):latest
build:
docker build --no-cache -t $(NAME):latest --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
Expand All @@ -11,6 +14,8 @@ push:
docker push $(NAME):latest
deploy: build tag push

start-arm:
docker run -d -p 8888:8888 -p 0.0.0.0:6006:6006 --restart=unless-stopped $(NAME):arm32v7
build-arm:
docker build --no-cache -t $(NAME):arm32v7 --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
Expand Down
35 changes: 35 additions & 0 deletions jupyter_notebook_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
import os
from IPython.lib import passwd

c.NotebookApp.ip = '*'
c.NotebookApp.port = int(os.getenv('PORT', 8888))
c.NotebookApp.open_browser = False
# This is unsecure, only for testing purpouses
c.NotebookApp.allow_origin = '*'
c.NotebookApp.allow_remote_access = True
#========================================
c.MultiKernelManager.default_kernel_name = 'python3'

# sets a password if PASSWORD is set in the environment
if 'PASSWORD' in os.environ:
password = os.environ['PASSWORD']
if password:
c.NotebookApp.password = passwd(password)
else:
c.NotebookApp.password = ''
c.NotebookApp.token = ''
del os.environ['PASSWORD']

0 comments on commit 21e2f5e

Please sign in to comment.