|
| 1 | +#!/bin/bash |
| 2 | +set -eux -o pipefail |
| 3 | + |
| 4 | +retry () { |
| 5 | + $* || (sleep 1 && $*) || (sleep 2 && $*) |
| 6 | +} |
| 7 | + |
| 8 | +SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" |
| 9 | +PROJECT_DIR="${SOURCE_DIR}/../.." |
| 10 | +pushd $SOURCE_DIR |
| 11 | + |
| 12 | +#install wget and make |
| 13 | +curl -k https://ymu.dl.osdn.jp/mingw/68260/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip -o mingw32.zip |
| 14 | +unzip mingw32.zip -d mingw32 |
| 15 | +mingw32/bin/mingw-get.exe install mingw32-make |
| 16 | +mingw32/bin/mingw-get.exe install msys-findutils |
| 17 | +mv mingw32/bin/mingw32-make.exe mingw32/bin/make.exe |
| 18 | +curl -k https://eternallybored.org/misc/wget/1.20.3/64/wget.exe -o mingw32/bin/wget.exe |
| 19 | +export PATH="${SOURCE_DIR}/mingw32/bin:$PATH" |
| 20 | + |
| 21 | +#install anaconda3 |
| 22 | +export CONDA_HOME="${SOURCE_DIR}/conda" |
| 23 | +export tmp_conda="${SOURCE_DIR}/conda" |
| 24 | +export miniconda_exe="${SOURCE_DIR}/miniconda.exe" |
| 25 | +rm -rf conda miniconda.exe |
| 26 | +curl -k https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o miniconda.exe |
| 27 | +./install_conda.bat |
| 28 | +export PATH="${tmp_conda}:${tmp_conda}/Library/usr/bin:${tmp_conda}/Library/bin:${tmp_conda}/Scripts:${tmp_conda}/bin:$PATH" |
| 29 | + |
| 30 | +eval "$(conda shell.bash hook)" |
| 31 | +conda create -qyn testenv python=3.7 |
| 32 | +conda activate testenv |
| 33 | + |
| 34 | +conda install sphinx |
| 35 | +pip install sphinx_gallery==0.3.1 flask pandas spacy ipython scipy pySoundFile scikit-image |
| 36 | +pip install -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme |
| 37 | +conda install -yq -c pytorch "cudatoolkit=10.1" pytorch torchvision torchtext |
| 38 | +conda install torchaudio -c pytorch-test |
| 39 | +python -m spacy download de |
| 40 | +python -m spacy download en |
| 41 | +pushd ${PROJECT_DIR} |
| 42 | +DIR=.jenkins |
| 43 | +python $DIR/remove_runnable_code.py beginner_source/aws_distributed_training_tutorial.py beginner_source/aws_distributed_training_tutorial.py || true |
| 44 | +python $DIR/remove_runnable_code.py beginner_source/data_loading_tutorial.py beginner_source/data_loading_tutorial.py || true |
| 45 | +python $DIR/remove_runnable_code.py beginner_source/dcgan_faces_tutorial.py beginner_source/dcgan_faces_tutorial.py || true |
| 46 | +python $DIR/remove_runnable_code.py intermediate_source/model_parallel_tutorial.py intermediate_source/model_parallel_tutorial.py || true |
| 47 | +python $DIR/remove_runnable_code.py advanced_source/static_quantization_tutorial.py advanced_source/static_quantization_tutorial.py || true |
| 48 | +python $DIR/remove_runnable_code.py prototype_source/numeric_suite_tutorial.py || true |
| 49 | +python $DIR/remove_runnable_code.py prototype_source/graph_mode_static_quantization_tutorial.py || true |
| 50 | + |
| 51 | +make docs |
0 commit comments