File tree Expand file tree Collapse file tree 5 files changed +34
-14
lines changed
doc/getstarted/build_and_install Expand file tree Collapse file tree 5 files changed +34
-14
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Windows -- in a consistent way.
42
42
43
43
.. code-block :: bash
44
44
45
- docker run -d -p 2202:22 -v $PWD :/paddle paddle:dev
45
+ docker run -d -p 2202:22 -p 8888:8888 - v $PWD :/paddle paddle:dev
46
46
47
47
This runs a container of the development environment Docker image
48
48
with the local source tree mounted to :code: `/paddle ` of the
@@ -82,6 +82,29 @@ Windows -- in a consistent way.
82
82
cd /paddle/build
83
83
ctest
84
84
85
+ 4. Run PaddlePaddle Book under Docker Container
86
+
87
+ The Jupyter Notebook is an open-source web application that allows
88
+ you to create and share documents that contain live code, equations,
89
+ visualizations and explanatory text in a single browser.
90
+
91
+ PaddlePaddle Book is an interactive Jupyter Notebook for users and developers.
92
+ We already exposed port 8888 for this book. If you want to
93
+ dig deeper into deep learning, PaddlePaddle Book definitely is your best choice.
94
+
95
+ Once you are inside the container, simply issue the command:
96
+
97
+ .. code-block :: bash
98
+
99
+ jupyter notebook
100
+
101
+ Then, you would back and paste the address into the local browser:
102
+
103
+ .. code-block :: text
104
+
105
+ http://localhost:8888/
106
+
107
+ That's all. Enjoy your journey!
85
108
86
109
CPU-only and GPU Images
87
110
-----------------------
Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
50
50
cd .. && rm -rf cmake-3.4.1
51
51
52
52
COPY . /paddle/
53
+ RUN cd /paddle/ && git submodule update --init --recursive
53
54
RUN /paddle/paddle/scripts/docker/build.sh
55
+
54
56
VOLUME ["/usr/share/nginx/html/data" , "/usr/share/nginx/html/paddle" ]
55
57
56
58
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
@@ -60,9 +62,7 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
60
62
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
61
63
EXPOSE 22
62
64
63
- # Jupyter Notebook directory.
64
- RUN mkdir /notes/
65
- WORKDIR "/notes"
65
+ # Jupyter Notebook: Paddle book
66
66
EXPOSE 8888
67
67
68
68
COPY ./paddle/scripts/docker/entrypoint /opt/bin/
Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \
50
50
cd .. && rm -rf cmake-3.4.1
51
51
52
52
COPY . /paddle/
53
+ RUN cd /paddle/ && git submodule update --init --recursive
53
54
RUN /paddle/paddle/scripts/docker/build.sh
55
+
54
56
VOLUME ["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"]
55
57
56
58
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
@@ -60,9 +62,7 @@ RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
60
62
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
61
63
EXPOSE 22
62
64
63
- # Jupyter Notebook directory.
64
- RUN mkdir /notes/
65
- WORKDIR "/notes"
65
+ # Jupyter Notebook: Paddle book
66
66
EXPOSE 8888
67
67
68
68
COPY ./paddle/scripts/docker/entrypoint /opt/bin/
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then
17
17
fi
18
18
19
19
mkdir -p /paddle/build # -p means no error if exists
20
- cd /paddle/build
20
+ # clean local cmake and third_party cache
21
+ cd /paddle/build && rm -rf * && rm -rf ../third_party
21
22
cmake .. \
22
23
-DWITH_DOC=${WITH_DOC:- OFF} \
23
24
-DWITH_GPU=${WITH_GPU:- OFF} \
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- LOG=/var/log/all
3
2
4
- touch $LOG
5
-
6
- /usr/sbin/sshd -D >> $LOG &
7
- jupyter notebook --ip=0.0.0.0 /notes/ >> $LOG &
8
- tail -f $LOG
3
+ /usr/sbin/sshd -D &
4
+ jupyter notebook --ip=0.0.0.0 /paddle/book/
You can’t perform that action at this time.
0 commit comments