提交 a7d2d278 编写于 作者: G gongweibao

fix bugs

上级 2cad087e
...@@ -6,7 +6,7 @@ cd $cur_path/../ ...@@ -6,7 +6,7 @@ cd $cur_path/../
.tools/convert-markdown-into-ipynb-and-test.sh .tools/convert-markdown-into-ipynb-and-test.sh
paddle_tag=0.10.0rc2 paddle_tag=0.10.0rc2
latest_tag=latest book_tag=latest
#generate docker file #generate docker file
if [ ${USE_UBUNTU_REPO_MIRROR} ]; then if [ ${USE_UBUNTU_REPO_MIRROR} ]; then
...@@ -15,14 +15,18 @@ else ...@@ -15,14 +15,18 @@ else
update_mirror_cmd="\\" update_mirror_cmd="\\"
fi fi
mkdir -p build #build docker image
echo "paddle_tag:"$paddle_tag
echo "book_tag:"$book_tag
cat > ./build/Dockerfile << EOF cat > Dockerfile <<EOF
FROM paddlepaddle/paddle:${paddle_tag} FROM paddlepaddle/paddle:${paddle_tag}
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com> MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
COPY . /book COPY . /book
RUN python /book/.tools/cache_dataset.py
RUN pip install -U nltk \
&& python /book/.tools/cache_dataset.py
RUN ${update_mirror_cmd} RUN ${update_mirror_cmd}
apt-get update && \ apt-get update && \
...@@ -36,6 +40,4 @@ EXPOSE 8888 ...@@ -36,6 +40,4 @@ EXPOSE 8888
CMD ["sh", "-c", "jupyter notebook --ip=0.0.0.0 --no-browser --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"] CMD ["sh", "-c", "jupyter notebook --ip=0.0.0.0 --no-browser --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True /book/"]
EOF EOF
#build docker image docker build --no-cache -t paddlepaddle/book:${paddle_tag} -t paddlepaddle/book:${book_tag} .
echo "paddle_tag:"$paddle_tag
echo $dockerfile | docker build --no-cache -t paddlepaddle/book:${paddle_tag} -t paddlepaddle/book:${latest_tag} -f ./build/Dockerfile .
#!/bin/env python #!/bin/env python
import paddle.v2.dataset as dataset import paddle.v2.dataset as dataset
import ntlk import nltk
#cifar
dataset.common.download(dataset.cifar.CIFAR100_URL, 'cifar',
dataset.cifar.CIFAR100_MD5)
dataset.common.download(dataset.cifar.CIFAR100_URL, 'cifar',
dataset.cifar.CIFAR100_MD5)
dataset.common.download(dataset.cifar.CIFAR10_URL, 'cifar',
dataset.cifar.CIFAR10_MD5)
dataset.common.download(dataset.cifar.CIFAR10_URL, 'cifar',
dataset.cifar.CIFAR10_MD5)
# Cache conll05 # Cache conll05
dataset.common.download(dataset.conll05.WORDDICT_URL, 'conll05st', \ dataset.common.download(dataset.conll05.WORDDICT_URL, 'conll05st', \
...@@ -28,5 +38,5 @@ dataset.common.download(dataset.uci_housing.URL, "uci_housing", \ ...@@ -28,5 +38,5 @@ dataset.common.download(dataset.uci_housing.URL, "uci_housing", \
dataset.uci_housing.MD5) dataset.uci_housing.MD5)
# Cache vmt14 # Cache vmt14
dataset.common.download(dataset.vmt14.URL_TRAIN, "wmt14",\ dataset.common.download(dataset.wmt14.URL_TRAIN, "wmt14",\
dataset.vmt14.MD5_TRAIN) dataset.wmt14.MD5_TRAIN)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册