Skip to content

Commit f4188a0

Browse files
Mu Liastonzhang
Mu Li
authored andcommitted
fix build
1 parent e29a357 commit f4188a0

8 files changed

+63
-5
lines changed

Jenkinsfile

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ stage("Build and Publish") {
3030
conda activate ${ENV_NAME}
3131
export CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}
3232
./static/cache.sh restore _build/eval/data
33-
./static/clean_eval.sh
3433
d2lbook build eval
3534
./static/cache.sh store _build/eval/data
3635
"""

config.ini

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ author = Aston Zhang, Zachary C. Lipton, Mu Li, and Alexander J. Smola
1010

1111
copyright = 2019, All authors. Licensed under CC-BY-SA-4.0 and MIT-0.
1212

13-
release = 1.1.0
13+
release = 1.2.0
1414

1515

1616
[build]
@@ -52,7 +52,7 @@ html_logo = static/logo-with-text.png
5252
[pdf]
5353

5454
# The file used to post-process the generated tex file.
55-
post_latex = ./static/post_latex/main.py
55+
# post_latex = ./static/post_latex/main.py
5656

5757
latex_logo = static/logo.png
5858
main_font = Source Serif Pro
@@ -67,8 +67,6 @@ save_patterns = d2l/mxnet.py, mxnet
6767
d2l/torch.py, pytorch
6868
d2l/tensorflow.py, tensorflow
6969

70-
version = 0.13.2
71-
7270
version_file = d2lzh/__init__.py
7371

7472

static/build.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
dependencies:
2+
- python=3.7
3+
- pip
4+
- pip:
5+
- .. # d2l
6+
- git+https://github.com/d2l-ai/d2l-book
7+
- mxnet-cu101==1.6.0
8+
- torchvision
9+
- -f https://download.pytorch.org/whl/torch_stable.html
10+
- torch==1.5.1+cu101
11+
- tensorflow
12+
- tensorflow-probability
13+
- cloudpickle==1.4.1 # due to https://github.com/tensorflow/probability/issues/991

static/build_html.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
rm -rf _build/rst _build/html
6+
d2lbook build rst --tab all
7+
# cp static/frontpage/frontpage.html _build/rst_all/
8+
d2lbook build html --tab all
9+
# cp -r static/frontpage/_images/* _build/html/_images/
10+
11+
for fn in `find _build/html/_images/ -iname '*.svg' `; do
12+
if [[ $fn == *'qr_'* ]] ; then # || [[ $fn == *'output_'* ]]
13+
continue
14+
fi
15+
# rsvg-convert installed on ubuntu changes unit from px to pt, so evening no
16+
# change of the size makes the svg larger...
17+
rsvg-convert -z 1 -f svg -o tmp.svg $fn
18+
mv tmp.svg $fn
19+
done

static/cache.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
if [ $# -ne 2 ]; then
4+
echo "usage:"
5+
echo " $0 store dir"
6+
echo " $0 restore dir"
7+
exit -1
8+
fi
9+
10+
cmd=$1
11+
dir=$2
12+
saved_dir="${dir///data/_data}"
13+
14+
if [ $cmd == "store" ]; then
15+
if [ -e $dir ]; then
16+
rm -rf $saved_dir
17+
mv $dir $saved_dir
18+
fi
19+
echo "Saved $dir to $saved_dir"
20+
elif [ $cmd == "restore" ]; then
21+
if [ -e $saved_dir ]; then
22+
rm -rf $dir
23+
mv $saved_dir $dir
24+
fi
25+
echo "Restored $dir from $saved_dir"
26+
else
27+
echo "unknown command $1, should be either store or restore"
28+
exit -1
29+
fi

static/favicon.png

4.22 KB
Loading

static/logo-with-text.png

85.1 KB
Loading

static/logo.png

54.3 KB
Loading

0 commit comments

Comments
 (0)