提交 34924f61 编写于 作者: L liaogang

update build_docker

上级 8ef0599b
#!/bin/bash
set -e
set -xe
cur_path="$(cd "$(dirname "$0")" && pwd -P)"
cd $cur_path/../
cd "$cur_path"/../
#paddle production image name
if [ ! -n "$1" ]; then
......@@ -50,7 +50,7 @@ MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
COPY . /book
EOF
if [ -n ${http_proxy} ]; then
if [ -n "${http_proxy}" ]; then
cat >> Dockerfile <<EOF
ENV http_proxy ${http_proxy}
ENV https_proxy ${http_proxy}
......@@ -58,20 +58,20 @@ EOF
fi
cat >> Dockerfile <<EOF
RUN pip install -U nltk \
RUN pip install -U nltk \
&& python /book/.tools/cache_dataset.py
RUN ${update_mirror_cmd}
apt-get update && \
apt-get install -y locales patch notedown && \
apt-get install -y locales patch && \
apt-get -y install gcc && \
apt-get -y clean && \
localedef -f UTF-8 -i en_US en_US.UTF-8 && \
pip install --upgrade pip && \
pip install -U pillow matplotlib jupyter numpy requests scipy
pip install -U notedown pillow matplotlib jupyter numpy requests scipy
#convert md to ipynb
RUN /book/.tools/notedown.sh
RUN /bin/bash ./book/.tools/notedown.sh
EXPOSE 8888
CMD ["sh", "-c", "jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册