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: Use Omnitrace's version number in installer download command #388

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
27 changes: 14 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,30 @@

import re

from rocm_docs import ROCmDocs

with open("../VERSION", encoding="utf-8") as f:
match = re.search(r"([0-9.]+)[^0-9.]+", f.read())
if not match:
raise ValueError("VERSION not found!")
version_number = match[1]

external_projects_current_project = "omnitrace"

project = "omnitrace"
# project info
project = "Omnitrace"
author = "Advanced Micro Devices, Inc."
copyright = "Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved."
version = version_number
release = version_number
html_title = f"Omnitrace {version} documentation"

external_toc_path = "./sphinx/_toc.yml"
extensions = ["rocm_docs", "rocm_docs.doxygen", "sphinxcontrib.datatemplates"]
html_theme = "rocm_docs_theme"
html_theme_options = {"flavor": "rocm"}
html_title = f"Omnitrace {version_number} documentation"

docs_core = ROCmDocs(html_title)
docs_core.setup()
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/xml")
docs_core.enable_api_reference()
external_toc_path = "./sphinx/_toc.yml"
external_projects_current_project = "omnitrace"

for sphinx_var in ROCmDocs.SPHINX_VARS:
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
doxygen_root = "doxygen"
doxysphinx_enabled = True
doxygen_project = {
"name": "Omnitrace API",
"path": "doxygen/xml",
}
64 changes: 34 additions & 30 deletions docs/install/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,45 +69,47 @@ might be more portable.
Installing Omnitrace from binary distributions
================================================

Every Omnitrace release provides binary installer scripts of the form:
.. datatemplate:nodata::

.. code-block:: shell
Every Omnitrace release provides binary installer scripts of the form:

omnitrace-{VERSION}-{OS_DISTRIB}-{OS_VERSION}[-ROCm-{ROCM_VERSION}[-{EXTRA}]].sh
.. code-block:: shell

For example,
omnitrace-{{ config.version }}-{OS_DISTRIB}-{OS_VERSION}[-ROCm-{ROCM_VERSION}[-{EXTRA}]].sh

.. code-block:: shell
For example,

omnitrace-1.0.0-ubuntu-18.04-OMPT-PAPI-Python3.sh
omnitrace-1.0.0-ubuntu-18.04-ROCm-405000-OMPT-PAPI-Python3.sh
...
omnitrace-1.0.0-ubuntu-20.04-ROCm-50000-OMPT-PAPI-Python3.sh
.. code-block:: shell

Any of the ``EXTRA`` fields with a CMake build option
(for example, PAPI, as referenced in a following section) or
with no link requirements (such as OMPT) have
self-contained support for these packages.
omnitrace-{{ config.version }}-ubuntu-18.04-OMPT-PAPI-Python3.sh
omnitrace-{{ config.version }}-ubuntu-18.04-ROCm-405000-OMPT-PAPI-Python3.sh
...
omnitrace-{{ config.version }}-ubuntu-20.04-ROCm-50000-OMPT-PAPI-Python3.sh

To install Omnitrace using a binary installer script, follow these steps:
Any of the ``EXTRA`` fields with a CMake build option
(for example, PAPI, as referenced in a following section) or
with no link requirements (such as OMPT) have
self-contained support for these packages.

#. Download the appropriate binary distribution
To install Omnitrace using a binary installer script, follow these steps:

.. code-block:: shell
#. Download the appropriate binary distribution

wget https://github.com/ROCm/omnitrace/releases/download/v<VERSION>/<SCRIPT>
.. code-block:: shell

#. Create the target installation directory
wget https://github.com/ROCm/omnitrace/releases/download/v{{ config.version }}/<SCRIPT>

.. code-block:: shell
#. Create the target installation directory

mkdir /opt/omnitrace
.. code-block:: shell

#. Run the installer script
mkdir /opt/omnitrace

.. code-block:: shell
#. Run the installer script

./omnitrace-1.0.0-ubuntu-18.04-ROCm-405000-OMPT-PAPI.sh --prefix=/opt/omnitrace --exclude-subdir
.. code-block:: shell

./omnitrace-{{ version }}-ubuntu-18.04-ROCm-405000-OMPT-PAPI.sh --prefix=/opt/omnitrace --exclude-subdir

Installing Omnitrace from source
========================================
Expand Down Expand Up @@ -319,18 +321,20 @@ You should also test the executables to confirm Omnitrace is correctly installed
Configure the environment
-----------------------------------

If environment modules are available and preferred, add them using these commands:
.. datatemplate:nodata::

.. code-block:: shell
If environment modules are available and preferred, add them using these commands:

module use /opt/omnitrace/share/modulefiles
module load omnitrace/1.0.0
.. code-block:: shell

Alternatively, you can directly source the ``setup-env.sh`` script:
module use /opt/omnitrace/share/modulefiles
module load omnitrace/{{ config.version }}

.. code-block:: shell
Alternatively, you can directly source the ``setup-env.sh`` script:

source /opt/omnitrace/share/omnitrace/setup-env.sh
.. code-block:: shell

source /opt/omnitrace/share/omnitrace/setup-env.sh

Test the executables
-----------------------------------
Expand Down
18 changes: 10 additions & 8 deletions docs/install/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
Omnitrace quick start
*************************************

To install Omnitrace, download the `Omnitrace installer <https://github.com/ROCm/omnitrace/releases/latest/download/omnitrace-install.py>`_
and specify ``--prefix <install-directory>``. The script attempts to auto-detect
the appropriate OS distribution and version. To include AMD ROCm Software support,
specify ``--rocm X.Y``, where ``X`` is the ROCm major
version and ``Y`` is the ROCm minor version, for example, ``--rocm 6.2``.
.. datatemplate:nodata::

.. code-block:: shell
To install Omnitrace, download the `Omnitrace installer <https://github.com/ROCm/omnitrace/releases/download/v{{ config.version }}/omnitrace-install.py>`_
and specify ``--prefix <install-directory>``. The script attempts to auto-detect
the appropriate OS distribution and version. To include AMD ROCm Software support,
specify ``--rocm X.Y``, where ``X`` is the ROCm major
version and ``Y`` is the ROCm minor version, for example, ``--rocm 6.2``.

wget https://github.com/ROCm/omnitrace/releases/latest/download/omnitrace-install.py
python3 ./omnitrace-install.py --prefix /opt/omnitrace --rocm 6.2
.. code-block:: shell

wget https://github.com/ROCm/omnitrace/releases/download/v{{ config.version }}/omnitrace-install.py
python3 ./omnitrace-install.py --prefix /opt/omnitrace --rocm 6.2

This script supports installation on Ubuntu, OpenSUSE, Red Hat, Debian, CentOS, and Fedora.
If the target OS is compatible with one of the operating system versions listed in
Expand Down
3 changes: 2 additions & 1 deletion docs/sphinx/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rocm-docs-core[api_reference]==1.4.1
rocm-docs-core[api_reference]==1.8.1
sphinxcontrib.datatemplates==0.11.0
61 changes: 35 additions & 26 deletions docs/sphinx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile requirements.in
# pip-compile docs/sphinx/requirements.in
#
accessible-pygments==0.0.5
# via pydata-sphinx-theme
alabaster==0.7.16
alabaster==1.0.0
# via sphinx
babel==2.15.0
babel==2.16.0
# via
# pydata-sphinx-theme
# sphinx
beautifulsoup4==4.12.3
# via pydata-sphinx-theme
breathe==4.35.0
# via rocm-docs-core
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.16.0
cffi==1.17.1
# via
# cryptography
# pynacl
Expand All @@ -33,6 +33,8 @@ click-log==0.4.0
# via doxysphinx
cryptography==43.0.1
# via pyjwt
defusedxml==0.7.1
# via sphinxcontrib-datatemplates
deprecated==1.2.14
# via pygithub
docutils==0.21.2
Expand All @@ -41,15 +43,15 @@ docutils==0.21.2
# myst-parser
# pydata-sphinx-theme
# sphinx
doxysphinx==3.3.9
doxysphinx==3.3.10
# via rocm-docs-core
fastjsonschema==2.20.0
# via rocm-docs-core
gitdb==4.0.11
# via gitpython
gitpython==3.1.43
# via rocm-docs-core
idna==3.7
idna==3.10
# via requests
imagesize==1.4.1
# via sphinx
Expand All @@ -67,13 +69,13 @@ markdown-it-py==3.0.0
# myst-parser
markupsafe==2.1.5
# via jinja2
mdit-py-plugins==0.4.1
mdit-py-plugins==0.4.2
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
mpire==2.10.2
# via doxysphinx
myst-parser==3.0.1
myst-parser==4.0.0
# via rocm-docs-core
numpy==1.26.4
# via doxysphinx
Expand All @@ -87,7 +89,7 @@ pydata-sphinx-theme==0.15.4
# via
# rocm-docs-core
# sphinx-book-theme
pygithub==2.3.0
pygithub==2.4.0
# via rocm-docs-core
pygments==2.18.0
# via
Expand All @@ -97,30 +99,31 @@ pygments==2.18.0
# sphinx
pyjson5==1.6.6
# via doxysphinx
pyjwt[crypto]==2.8.0
pyjwt[crypto]==2.9.0
# via pygithub
pynacl==1.5.0
# via pygithub
pyparsing==3.1.2
pyparsing==3.1.4
# via doxysphinx
pyyaml==6.0.1
pyyaml==6.0.2
# via
# myst-parser
# rocm-docs-core
# sphinx-external-toc
# sphinxcontrib-datatemplates
requests==2.32.3
# via
# pygithub
# sphinx
rocm-docs-core[api-reference]==1.4.1
# via -r requirements.in
rocm-docs-core[api-reference]==1.8.1
# via -r docs/sphinx/requirements.in
smmap==5.0.1
# via gitdb
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
soupsieve==2.6
# via beautifulsoup4
sphinx==7.3.7
sphinx==8.0.2
# via
# breathe
# myst-parser
Expand All @@ -131,37 +134,43 @@ sphinx==7.3.7
# sphinx-design
# sphinx-external-toc
# sphinx-notfound-page
# sphinxcontrib-datatemplates
# sphinxcontrib-runcmd
sphinx-book-theme==1.1.3
# via rocm-docs-core
sphinx-copybutton==0.5.2
# via rocm-docs-core
sphinx-design==0.6.0
sphinx-design==0.6.1
# via rocm-docs-core
sphinx-external-toc==1.0.1
# via rocm-docs-core
sphinx-notfound-page==1.0.2
sphinx-notfound-page==1.0.4
# via rocm-docs-core
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-datatemplates==0.11.0
# via -r docs/sphinx/requirements.in
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
sphinxcontrib-runcmd==0.2.0
# via sphinxcontrib-datatemplates
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
tomli==2.0.1
# via sphinx
tqdm==4.66.4
tqdm==4.66.5
# via mpire
typing-extensions==4.12.2
# via
# pydata-sphinx-theme
# pygithub
urllib3==2.2.2
urllib3==2.2.3
# via
# pygithub
# requests
Expand Down