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

docs: add API documentation for benchmarking #21

Merged
merged 2 commits into from
May 7, 2024
Merged
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
12 changes: 10 additions & 2 deletions Dockerfile.docs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
# Useful for local testing

FROM python:3-slim
RUN apt-get update && apt-get install --no-install-recommends -y git \
&& pip install mkdocs "mkdocs-material>=8.2" "mkdocs-htmlproofer-plugin>=0.8" "mkdocs-swagger-ui-tag" && \
RUN apt-get update && apt-get install --no-install-recommends -y git wget unzip \
&& pip install mkdocs "mkdocs-material>=8.2" "mkdocs-htmlproofer-plugin>=0.8" \
"mkdocs-swagger-ui-tag" "mkdocstrings>=0.24.3" "mkdocstrings-python>=1.9.2" && \
rm -rf /var/lib/apt/lists/*

WORKDIR /apis
RUN wget https://github.com/intel-retail/performance-tools/archive/refs/heads/main.zip
RUN unzip main.zip
WORKDIR /benchmark-scripts
RUN mv /apis/performance-tools-main/benchmark-scripts/* .

EXPOSE 8000
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
8 changes: 8 additions & 0 deletions docs_src/performance-tools/api-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# API Documentation for Benchmark Scripts

## Benchmark Package

::: benchmark
handler: python
options:
show_source: false
10 changes: 7 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repo_name: "intel-retail/documentation"
repo_url: "https://github.com/intel-retail/documentation"
docs_dir: ./docs_src
site_dir: ./docs
copyright: 'Copyright © 2023 Intel Corporation'
copyright: 'Copyright © 2024 Intel Corporation'
use_directory_urls: false
theme:
name: 'material'
Expand All @@ -27,8 +27,11 @@ theme:
- toc.integrate
plugins:
- search
repo_url: https://github.com/intel-retail/documentation
repo_name: intel-retail/documentation
- mkdocstrings:
enable_inventory: true
handlers:
python:
paths: [../benchmark-scripts]
nav:
- Home: 'index.md'
- Architecture Decisions:
Expand All @@ -41,6 +44,7 @@ nav:
- Target Device: 'Architecture/target-device.md'
- Performance Tools:
- Benchmarking: 'performance-tools/benchmark.md'
- Benchmarking APIs: 'performance-tools/api-docs.md'
extra_css:
- ./stylesheets/index.css
- https://fonts.googleapis.com/icon?family=Material+Icons
Expand Down