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 @@
set -ex
# shellcheck disable=SC1091
source ./packaging/pkg_helpers.bash
export NO_CUDA_PACKAGE=1
setup_env 0.8.0
setup_wheel_python
# Starting 0.10, `pip install pytorch` defaults to ROCm.
export PYTORCH_VERSION_SUFFIX="+cpu"
setup_pip_pytorch_version
# pytorch is already installed
pip install --no-deps ~/workspace/torchaudio*
if [[ -z "$PYTORCH_VERSION" ]]; then
# Nightly build
pip install --progress-bar off --pre torch -f "https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html"
else
# Release branch
pip install --progress-bar off "torch==${PYTORCH_VERSION}+cpu" \
-f https://download.pytorch.org/whl/torch_stable.html \
-f "https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/torch_${UPLOAD_CHANNEL}.html"
fi
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:
build_docs:
<<: *binary_common
docker:
- image: "pytorch/manylinux-cuda100"
- image: "python:<< parameters.python_version >>"
resource_class: 2xlarge+
steps:
- attach_workspace:
......@@ -650,11 +650,17 @@ jobs:
- checkout
- load_conda_channel_flags
- run:
name: Install pytorch-audio
command: .circleci/build_docs/install_wheels.sh
name: Install packages
command: |
apt-get -qq update && apt-get -qq install -y ffmpeg libsndfile-dev
.circleci/build_docs/install_wheels.sh
- run:
name: Build docs
command: .circleci/build_docs/build_docs.sh
command: |
cd docs
make 'SPHINXOPTS=-W' html
environment:
BUILD_GALLERY: 1
- persist_to_workspace:
root: ./
paths:
......
......@@ -642,7 +642,7 @@ jobs:
build_docs:
<<: *binary_common
docker:
- image: "pytorch/manylinux-cuda100"
- image: "python:<< parameters.python_version >>"
resource_class: 2xlarge+
steps:
- attach_workspace:
......@@ -650,11 +650,17 @@ jobs:
- checkout
- load_conda_channel_flags
- run:
name: Install pytorch-audio
command: .circleci/build_docs/install_wheels.sh
name: Install packages
command: |
apt-get -qq update && apt-get -qq install -y ffmpeg libsndfile-dev
.circleci/build_docs/install_wheels.sh
- run:
name: Build docs
command: .circleci/build_docs/build_docs.sh
command: |
cd docs
make 'SPHINXOPTS=-W' html
environment:
BUILD_GALLERY: 1
- persist_to_workspace:
root: ./
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