From b447d1a013f2f862eace34e5613552853402d2d8 Mon Sep 17 00:00:00 2001 From: Michael Benayoun Date: Thu, 19 Dec 2024 12:10:33 +0100 Subject: [PATCH] Build doc --- .github/workflows/build_pr_documentation.yml | 78 ++++++++++---------- docs/Dockerfile | 3 +- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index 6eb09aff304..4de5ff08a56 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -70,45 +70,45 @@ jobs: pip install black 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 .. - - # TODO: enable Furiosa doc build in PRs once archive.furiosa.ai is public - - name: Make Furiosa documentation - run: | - echo "For PRs we don't build Furiosa doc" - - - name: Make AMD documentation - run: | - sudo docker system prune -a -f - cd optimum-amd - make doc BUILD_DIR=amd-doc-build VERSION=pr_$PR_NUMBER - sudo mv amd-doc-build ../optimum - cd .. - - - name: Make TPU documentation - run: | - sudo docker system prune -a -f - source venv-doc/bin/activate - cd optimum-tpu - pip install -U pip - pip install . -f https://storage.googleapis.com/libtpu-releases/index.html - doc-builder build optimum.tpu docs/source/ --build_dir tpu-doc-build --version pr_$PR_NUMBER --version_tag_suffix "" --html --clean - mv tpu-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 .. + + # # TODO: enable Furiosa doc build in PRs once archive.furiosa.ai is public + # - name: Make Furiosa documentation + # run: | + # echo "For PRs we don't build Furiosa doc" + + # - name: Make AMD documentation + # run: | + # sudo docker system prune -a -f + # cd optimum-amd + # make doc BUILD_DIR=amd-doc-build VERSION=pr_$PR_NUMBER + # sudo mv amd-doc-build ../optimum + # cd .. + + # - name: Make TPU documentation + # run: | + # sudo docker system prune -a -f + # source venv-doc/bin/activate + # cd optimum-tpu + # pip install -U pip + # pip install . -f https://storage.googleapis.com/libtpu-releases/index.html + # doc-builder build optimum.tpu docs/source/ --build_dir tpu-doc-build --version pr_$PR_NUMBER --version_tag_suffix "" --html --clean + # mv tpu-doc-build ../optimum + # cd .. - name: Make Optimum documentation run: | diff --git a/docs/Dockerfile b/docs/Dockerfile index d8bd060a46c..13ad3258b3d 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -8,5 +8,4 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/doc-builder.git RUN git clone $clone_url && cd optimum && git checkout $commit_sha -RUN python3 -m pip install --no-cache-dir ./optimum[onnxruntime,benchmark,quality,exporters-tf,doc-build,diffusers] -RUN python3 -m pip install ./optimum[exporters-executorch] +RUN python3 -m pip install --no-cache-dir ./optimum[onnxruntime,benchmark,quality,exporters-tf,exporters-executorch,doc-build,diffusers] --index-url https://download.pytorch.org/whl/cpu