Commit d33a8d9d authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Use `python:3.X` Docker image for build doc (#2151)

Summary:
Currently, the doc build job uses `pytorch/manylinux-cuda100` as base environment image.
This PR changes that with `python:3.X`.

The problem with the previous one is
- The image is unnecessarily huge with tools not needed for build doc. (+3GB)
- No easy way to install ffmpeg>=4.1.

https://518849-90321822-gh.circle-artifacts.com/0/docs/index.html

Pull Request resolved: https://github.com/pytorch/audio/pull/2151

Reviewed By: carolineechen

Differential Revision: D33585043

Pulled By: mthrok

fbshipit-source-id: d6d2f6ab33511b8f5c7ca358bc6545e253c1b752
parent 7f859111
#!/usr/bin/env bash
set -ex
# shellcheck disable=SC1091
source ./packaging/pkg_helpers.bash
export NO_CUDA_PACKAGE=1
setup_env 0.8.0
setup_wheel_python
pushd docs
pip install -r requirements.txt
yum install -y -q libsndfile-devel
pip install -r requirements-tutorials.txt
BUILD_GALLERY=1 make 'SPHINXOPTS=-W' html
popd
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
set -ex set -ex
# shellcheck disable=SC1091 if [[ -z "$PYTORCH_VERSION" ]]; then
source ./packaging/pkg_helpers.bash # Nightly build
export NO_CUDA_PACKAGE=1 pip install --progress-bar off --pre torch -f "https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html"
setup_env 0.8.0 else
setup_wheel_python # Release branch
# Starting 0.10, `pip install pytorch` defaults to ROCm. pip install --progress-bar off "torch==${PYTORCH_VERSION}+cpu" \
export PYTORCH_VERSION_SUFFIX="+cpu" -f https://download.pytorch.org/whl/torch_stable.html \
setup_pip_pytorch_version -f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
# pytorch is already installed fi
pip install --no-deps ~/workspace/torchaudio* pip install --progress-bar off --no-deps ~/workspace/torchaudio*
pip install --progress-bar off -r docs/requirements.txt -r docs/requirements-tutorials.txt
...@@ -642,7 +642,7 @@ jobs: ...@@ -642,7 +642,7 @@ jobs:
build_docs: build_docs:
<<: *binary_common <<: *binary_common
docker: docker:
- image: "pytorch/manylinux-cuda100" - image: "python:<< parameters.python_version >>"
resource_class: 2xlarge+ resource_class: 2xlarge+
steps: steps:
- attach_workspace: - attach_workspace:
...@@ -650,11 +650,17 @@ jobs: ...@@ -650,11 +650,17 @@ jobs:
- checkout - checkout
- load_conda_channel_flags - load_conda_channel_flags
- run: - run:
name: Install pytorch-audio name: Install packages
command: .circleci/build_docs/install_wheels.sh command: |
apt-get -qq update && apt-get -qq install -y ffmpeg libsndfile-dev
.circleci/build_docs/install_wheels.sh
- run: - run:
name: Build docs name: Build docs
command: .circleci/build_docs/build_docs.sh command: |
cd docs
make 'SPHINXOPTS=-W' html
environment:
BUILD_GALLERY: 1
- persist_to_workspace: - persist_to_workspace:
root: ./ root: ./
paths: paths:
......
...@@ -642,7 +642,7 @@ jobs: ...@@ -642,7 +642,7 @@ jobs:
build_docs: build_docs:
<<: *binary_common <<: *binary_common
docker: docker:
- image: "pytorch/manylinux-cuda100" - image: "python:<< parameters.python_version >>"
resource_class: 2xlarge+ resource_class: 2xlarge+
steps: steps:
- attach_workspace: - attach_workspace:
...@@ -650,11 +650,17 @@ jobs: ...@@ -650,11 +650,17 @@ jobs:
- checkout - checkout
- load_conda_channel_flags - load_conda_channel_flags
- run: - run:
name: Install pytorch-audio name: Install packages
command: .circleci/build_docs/install_wheels.sh command: |
apt-get -qq update && apt-get -qq install -y ffmpeg libsndfile-dev
.circleci/build_docs/install_wheels.sh
- run: - run:
name: Build docs name: Build docs
command: .circleci/build_docs/build_docs.sh command: |
cd docs
make 'SPHINXOPTS=-W' html
environment:
BUILD_GALLERY: 1
- persist_to_workspace: - persist_to_workspace:
root: ./ root: ./
paths: paths:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment