File tree Expand file tree Collapse file tree 13 files changed +808
-466
lines changed Expand file tree Collapse file tree 13 files changed +808
-466
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
36
36
TORCHAUDIO_VERSION=$( cat ci_commit_pins/audio.txt)
37
37
TORCHVISION_VERSION=$( cat ci_commit_pins/vision.txt)
38
38
39
+ BUILD_DOCS=1
40
+
39
41
# Copy requirements-lintrunner.txt from root to here
40
42
cp ../../requirements-lintrunner.txt ./
41
43
@@ -51,6 +53,7 @@ docker build \
51
53
--build-arg " TORCHVISION_VERSION=${TORCHVISION_VERSION} .${NIGHTLY} " \
52
54
--build-arg " BUCK2_VERSION=${BUCK2_VERSION} " \
53
55
--build-arg " LINTRUNNER=${LINTRUNNER} " \
56
+ --build-arg " BUILD_DOCS=${BUILD_DOCS} " \
54
57
-f " ${OS} " /Dockerfile \
55
58
" $@ " \
56
59
.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ # All rights reserved.
4
+ #
5
+ # This source code is licensed under the BSD-style license found in the
6
+ # LICENSE file in the root directory of this source tree.
7
+
8
+ set -ex
9
+
10
+ if [ -n " $BUILD_DOCS " ]; then
11
+ apt-get update
12
+ # Ignore error if gpg-agent doesn't exist (for Ubuntu 16.04)
13
+ apt-get install -y gpg-agent || :
14
+
15
+ curl --retry 3 -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
16
+ sudo apt-get install -y nodejs
17
+
18
+ curl --retry 3 -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
19
+ echo " deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
20
+
21
+ apt-get update
22
+ apt-get install -y --no-install-recommends yarn
23
+ yarn global add katex --prefix /usr/local
24
+
25
+ sudo apt-get -y install doxygen
26
+
27
+ apt-get autoclean && apt-get clean
28
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
29
+
30
+ fi
Original file line number Diff line number Diff line change @@ -15,8 +15,11 @@ hypothesis==6.84.2
15
15
parameterized==0.9.0
16
16
17
17
# Doc build requirements
18
- sphinx==5.0 .0
18
+ sphinx==4.5 .0
19
19
sphinx-gallery
20
+ breathe==4.35.0
21
+ exhale==0.3.6
22
+ docutils==0.16
20
23
matplotlib
21
24
# PyTorch Theme
22
25
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ RUN bash ./install_buck.sh && rm install_buck.sh
24
24
COPY ./common/install_user.sh install_user.sh
25
25
RUN bash ./install_user.sh && rm install_user.sh
26
26
27
+ # Install docs
28
+ ARG BUILD_DOCS
29
+ COPY ./common/install_docs_reqs.sh install_docs_reqs.sh
30
+ RUN bash ./install_docs_reqs.sh && rm install_docs_reqs.sh
31
+
27
32
# Install conda and other dependencies
28
33
ARG MINICONDA_VERSION
29
34
ARG PYTHON_VERSION
Original file line number Diff line number Diff line change 46
46
47
47
# Build docset:
48
48
cd docs
49
+ doxygen source/Doxyfile
49
50
make html
50
51
cd ..
51
52
Original file line number Diff line number Diff line change 2
2
#
3
3
4
4
# You can set these variables from the command line.
5
- SPHINXOPTS = -WT --keep-going
5
+ # SPHINXOPTS = -WT --keep-going TODO(T165752164) fix sphinx warnings around preprocess macros in cpp like __ET_DEPRECATED
6
6
SPHINXBUILD = sphinx-build
7
7
SPHINXPROJ = ExecuTorch
8
8
SOURCEDIR = source
You can’t perform that action at this time.
0 commit comments