|
| 1 | +sudo apt-get update |
| 2 | +sudo apt-get install -y --no-install-recommends unzip p7zip-full sox libsox-dev libsox-fmt-all |
| 3 | + |
| 4 | +# Install a nightly build of pytorch |
| 5 | + |
| 6 | +# GPU, requires CUDA version 8.0 |
| 7 | +pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cu80/torch_nightly.html |
| 8 | + |
| 9 | +# GPU, requires CUDA version 9.0 |
| 10 | +# pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cu90/torch_nightly.html |
| 11 | + |
| 12 | +# GPU, requires CUDA version 9.2 |
| 13 | +# pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html |
| 14 | + |
| 15 | +# CPU |
| 16 | +# pip install cython torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html |
| 17 | + |
| 18 | + |
| 19 | +export PATH=/opt/conda/bin:$PATH |
| 20 | +# pillow >= 4.2 will throw error when trying to write mode RGBA as JPEG, |
| 21 | +# this is a workaround to the issue. |
| 22 | +conda install -y sphinx==1.7.9 pandas pillow=4.1.1 |
| 23 | +# PyTorch Theme |
| 24 | +rm -rf src |
| 25 | +pip install -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme |
| 26 | +pip install sphinx-gallery tqdm matplotlib ipython |
| 27 | + |
| 28 | +git clone https://github.com/pytorch/vision --quiet |
| 29 | +pushd vision |
| 30 | +pip install . --no-deps # We don't want it to install the stock PyTorch version from pip |
| 31 | +popd |
| 32 | + |
| 33 | +git clone https://github.com/pytorch/audio --quiet |
| 34 | +pushd audio |
| 35 | +python setup.py install |
| 36 | +popd |
| 37 | + |
| 38 | +# Download dataset for beginner_source/dcgan_faces_tutorial.py |
| 39 | +curl https://s3.amazonaws.com/pytorch-tutorial-assets/img_align_celeba.zip --output img_align_celeba.zip |
| 40 | +sudo mkdir -p /home/ubuntu/facebook/datasets/celeba |
| 41 | +sudo chmod -R 0777 /home/ubuntu/facebook/datasets/celeba |
| 42 | +unzip img_align_celeba.zip -d /home/ubuntu/facebook/datasets/celeba > null |
| 43 | + |
| 44 | +# Download dataset for beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py |
| 45 | +mkdir data/ |
| 46 | +curl https://s3.amazonaws.com/pytorch-tutorial-assets/iris.data --output data/iris.data |
| 47 | + |
| 48 | +# Download dataset for beginner_source/chatbot_tutorial.py |
| 49 | +curl https://s3.amazonaws.com/pytorch-tutorial-assets/cornell_movie_dialogs_corpus.zip --output cornell_movie_dialogs_corpus.zip |
| 50 | +mkdir -p beginner_source/data |
| 51 | +unzip cornell_movie_dialogs_corpus.zip -d beginner_source/data/ > null |
| 52 | + |
| 53 | +# Download dataset for beginner_source/audio_classifier_tutorial.py |
| 54 | +curl https://s3.amazonaws.com/pytorch-tutorial-assets/UrbanSound8K.tar.gz --output UrbanSound8K.tar.gz |
| 55 | +tar -xzf UrbanSound8K.tar.gz -C ./beginner_source |
| 56 | + |
| 57 | +# Download model for beginner_source/fgsm_tutorial.py |
| 58 | +curl https://s3.amazonaws.com/pytorch-tutorial-assets/lenet_mnist_model.pth --output ./beginner_source/lenet_mnist_model.pth |
| 59 | + |
| 60 | +# We will fix the hybrid frontend tutorials when the API is stable |
| 61 | +rm beginner_source/hybrid_frontend/learning_hybrid_frontend_through_example_tutorial.py |
| 62 | +rm beginner_source/hybrid_frontend/introduction_to_hybrid_frontend_tutorial.py |
| 63 | + |
| 64 | +make docs |
| 65 | + |
| 66 | +rm -rf vision |
| 67 | +rm -rf audio |
0 commit comments