File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ WORKDIR "/notes"
50
50
EXPOSE 8888
51
51
52
52
RUN mkdir -p /opt/run
53
- ADD 00_sshd /opt/run/
54
- ADD 01_jupyter /opt/run/
55
- ADD run_all /opt/run/
53
+ COPY ./paddle/scripts/docker/jupyter_notebook_config.py /root/.jupyter/
54
+ COPY ./paddle/scripts/docker/00_sshd /opt/run/
55
+ COPY ./paddle/scripts/docker/01_jupyter /opt/run/
56
+ COPY ./paddle/scripts/docker/run_all /opt/bin/
56
57
57
- ENTRYPOINT ["/opt/bin/run_all" ]
58
+ CMD ["/opt/bin/run_all" ]
Original file line number Diff line number Diff line change
1
+ # from https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/jupyter_notebook_config.py
2
+ # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ # ==============================================================================
16
+ import os
17
+ from IPython .lib import passwd
18
+
19
+ c .NotebookApp .ip = '*'
20
+ c .NotebookApp .port = int (os .getenv ('PORT' , 8888 ))
21
+ c .NotebookApp .open_browser = False
22
+ c .MultiKernelManager .default_kernel_name = 'python2'
23
+
24
+ # sets a password if PASSWORD is set in the environment
25
+ if 'PASSWORD' in os .environ :
26
+ c .NotebookApp .password = passwd (os .environ ['PASSWORD' ])
27
+ del os .environ ['PASSWORD' ]
You can’t perform that action at this time.
0 commit comments