Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PR doc build v2 #1273

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 0 additions & 121 deletions .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,124 +22,3 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: true

build_documentation:
needs: authorize
runs-on: ubuntu-latest
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.number }}
EVENT_CONTEXT: ${{ toJSON(github.event) }}
PR_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}

steps:
- uses: actions/checkout@v2
with:
repository: 'huggingface/doc-builder'
path: doc-builder

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum'
path: optimum
ref: ${{ github.event.pull_request.merge_commit_sha }}

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-habana'
path: optimum-habana

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-graphcore'
path: optimum-graphcore

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-intel'
path: optimum-intel

- uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-furiosa'
path: optimum-furiosa

- name: Setup environment
run: |
pip uninstall -y doc-builder
cd doc-builder
git pull origin main
pip install .
pip install black
cd ..

- name: Make Graphcore documentation
run: |
cd optimum-graphcore
make doc BUILD_DIR=graphcore-doc-build VERSION=pr_$PR_NUMBER
sudo mv graphcore-doc-build ../optimum
cd ..

- name: Make Habana documentation
run: |
sudo docker system prune -a -f
cd optimum-habana
make doc BUILD_DIR=habana-doc-build VERSION=pr_$PR_NUMBER
sudo mv habana-doc-build ../optimum
cd ..

- name: Make Intel documentation
run: |
sudo docker system prune -a -f
cd optimum-intel
make doc BUILD_DIR=intel-doc-build VERSION=pr_$PR_NUMBER
sudo mv intel-doc-build ../optimum
cd ..

- name: Make Furiosa documentation
run: |
cd optimum-furiosa
pip install .
sudo apt update
sudo apt install -y ca-certificates apt-transport-https gnupg
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5F03AFA423A751913F249259814F888B20B09A7E
# TODO: remove secrets and pull_request_target once archive.furiosa.ai is public
sudo tee -a /etc/apt/auth.conf.d/furiosa.conf > /dev/null <<EOT
machine archive.furiosa.ai
login ${{ secrets.FURIOSA_ACCESS_KEY }}
password ${{ secrets.FURIOSA_SECRET_ACCESS_KEY }}
EOT
sudo chmod 400 /etc/apt/auth.conf.d/furiosa.conf
sudo tee -a /etc/apt/sources.list.d/furiosa.list <<EOT
deb [arch=amd64] https://archive.furiosa.ai/ubuntu jammy restricted
EOT
sudo apt update && sudo apt install -y furiosa-libnux
doc-builder build optimum.furiosa docs/source/ --build_dir furiosa-doc-build --version pr_$PR_NUMBER --version_tag_suffix "" --html --clean
mv furiosa-doc-build ../optimum
cd ..

- name: Make Optimum documentation
run: |
sudo docker system prune -a -f
cd optimum
make doc BUILD_DIR=optimum-doc-build VERSION=pr_$PR_NUMBER COMMIT_SHA_OPTIMUM=$COMMIT_SHA CLONE_URL=$PR_CLONE_URL
cd ..

- name: Combine subpackage documentation
run: |
cd optimum
sudo python docs/combine_docs.py --subpackages graphcore habana intel neuron furiosa --version pr_$PR_NUMBER
sudo mv optimum-doc-build ../
cd ..

- name: Save commit_sha & pr_number
run: |
sudo chmod -R ugo+rwx optimum-doc-build
cd optimum-doc-build
echo ${{ env.COMMIT_SHA }} > ./commit_sha
echo ${{ env.PR_NUMBER }} > ./pr_number

- uses: actions/upload-artifact@v3
with:
name: doc-build-artifact
path: optimum-doc-build/
2 changes: 1 addition & 1 deletion docs/source/quicktour.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ specific language governing permissions and limitations under the License.
-->

# Quick tour

hey hey hey
This quick tour is intended for developers who are ready to dive into the code and see examples of how to integrate 🤗 Optimum into their model training and inference workflows.

## Accelerated inference
Expand Down
Loading