Skip to content

Commit 62a09cb

Browse files
chaitanya1731chaitanya1731
authored andcommitted
Added Initial Documentation Code
Signed-off-by: chaitanya1731 <chaitanya.kulkarni@intel.com>
1 parent 3382d2b commit 62a09cb

File tree

9 files changed

+263
-2
lines changed

9 files changed

+263
-2
lines changed

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build:
11+
permissions:
12+
contents: write # for Git to git push
13+
runs-on: ubuntu-22.04
14+
15+
steps:
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y python3-venv git
20+
- uses: actions/checkout@v4
21+
with:
22+
ref: main
23+
- name: Set up doc directory
24+
run: |
25+
mkdir $HOME/output
26+
touch $HOME/output/.nojekyll
27+
- name: Build latest
28+
run: |
29+
GITHUB_SHA=$(git rev-parse HEAD)
30+
export GITHUB_SHA
31+
rm -rf _work/venv
32+
make vhtml
33+
mv _build/html/* $HOME/output/
34+
- name: Deploy the docs
35+
shell: bash
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
38+
run: |
39+
cd $HOME/output
40+
git init
41+
git config --global user.name "${GITHUB_ACTOR}"
42+
git config --global user.email "${GITHUB_ACTOR}@github.com"
43+
git add .
44+
git commit -m "latest html output"
45+
git push -f https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:latesthtml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_build
2+
.vscode

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
# You can set these variables from the command line.
4+
SPHINXOPTS =
5+
SPHINXBUILD = sphinx-build
6+
SOURCEDIR =
7+
BUILDDIR = _build
8+
9+
# Put it first so that "make" without argument is like "make help".
10+
help:
11+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12+
13+
.PHONY: help Makefile
14+
15+
# Catch-all target: route all unknown targets to Sphinx using the new
16+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
17+
# %: Makefile
18+
#@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
19+
20+
# Generate doc site under _build/html with Sphinx.
21+
vhtml: _work/venv/.stamp
22+
. _work/venv/bin/activate && \
23+
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
24+
# cp docs/index.html $(BUILDDIR)/html/index.html
25+
26+
html:
27+
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
28+
# cp docs/index.html $(BUILDDIR)/html/index.html
29+
30+
clean-html:
31+
rm -rf $(BUILDDIR)/html
32+
33+
# Set up a Python3 environment with the necessary tools for document creation.
34+
_work/venv/.stamp: ./requirements.txt
35+
rm -rf ${@D}
36+
python3 -m venv ${@D}
37+
. ${@D}/bin/activate && pip install wheel && pip install -r $<
38+
touch $@

_static/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.wy-nav-content {
2+
max-width: 90% !important;
3+
}

conf.py

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/master/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
# import os
16+
# import sys
17+
# sys.path.insert(0, os.path.abspath('.'))
18+
19+
# -- Project information -----------------------------------------------------
20+
21+
project = 'Intel® Data Center GPU Driver for OpenShift*'
22+
copyright = '2024, Intel® Corporation'
23+
author = 'Intel® Corporation'
24+
25+
# The short X.Y version
26+
# version = 'devel'
27+
# The full version, including alpha/beta/rc tags
28+
# release = 'GA'
29+
30+
# Versions to show in the version menu
31+
32+
# -- General configuration ---------------------------------------------------
33+
34+
# If your documentation needs a minimal Sphinx version, state it here.
35+
#
36+
# needs_sphinx = '1.0'
37+
38+
# Add any Sphinx extension module names here, as strings. They can be
39+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40+
# ones.
41+
extensions = ['myst_parser', 'sphinx_md']
42+
# myst_enable_extensions = [
43+
# "html_admonition",
44+
# ]
45+
# Add any paths that contain templates here, relative to this directory.
46+
templates_path = ['_templates']
47+
48+
# The suffix(es) of source filenames.
49+
# You can specify multiple suffix as a list of string:
50+
#
51+
source_suffix = ['.rst', '.md']
52+
53+
# List of patterns, relative to source directory, that match files and
54+
# directories to ignore when looking for source files.
55+
# This pattern also affects html_static_path and html_extra_path.
56+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
57+
58+
# -- Options for HTML output -------------------------------------------------
59+
60+
# The theme to use for HTML and HTML Help pages. See the documentation for
61+
# a list of builtin themes.
62+
#
63+
html_theme = 'sphinx_rtd_theme'
64+
html_title = "Intel® Data Center GPU Driver for OpenShift*"
65+
# Theme options are theme-specific and customize the look and feel of a theme
66+
# further. For a list of options available for each theme, see the
67+
# documentation.
68+
69+
html_context = {
70+
'display_github': True,
71+
'github_host': 'github.com',
72+
'github_user': 'intel',
73+
'github_repo': 'intel-data-center-gpu-driver-for-openshift',
74+
'github_version': 'main/',
75+
'versions_menu': True,
76+
}
77+
html_css_files = [
78+
'custom.css',
79+
]
80+
81+
# Add any paths that contain custom static files (such as style sheets) here,
82+
# relative to this directory. They are copied after the builtin static files,
83+
# so a file named "default.css" will overwrite the builtin "default.css".
84+
85+
html_static_path = ['_static']
86+
87+
88+
# Custom sidebar templates, must be a dictionary that maps document names
89+
# to template names.
90+
#
91+
# The default sidebars (for documents that don't match any pattern) are
92+
# defined by theme itself. Builtin themes are using these templates by
93+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
94+
# 'searchbox.html']``.
95+
#
96+
# html_sidebars = {}
97+
98+
99+
# -- Options for HTMLHelp output ---------------------------------------------
100+
101+
# Output file base name for HTML help builder.
102+
htmlhelp_basename = 'IntelDataCenterGPUDriverforOpenShiftdoc'

debug/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Developers Guide
22

3-
> Disclaimer: Please note that this module is currently under development and may contain partially implemented features, therefore it is not supported in the current release.
3+
```{admonition} Disclaimer
4+
Please note that this module is currently under development and may contain partially implemented features, therefore it is not supported in the current release.
5+
```
46

57
## Debug Intel Data Center GPU Driver Container Image on OpenShift Cluster
68

79
To debug the driver container image, please make sure the OpenShift cluster is provisioned with Intel Data Center GPU Flex cards available on the cluster nodes.
810

9-
> Note: The following operations are verified on OCP-4.11 and OCP-4.12 cluster with Intel® Data Center GPU Flex 140
11+
```{note}
12+
The following operations are verified on OCP-4.11 and OCP-4.12 cluster with Intel® Data Center GPU Flex 140
13+
```
1014

1115
### Debugging Driver Build
1216
Firstly, [Red Hat OCP buildconfig](https://docs.openshift.com/container-platform/4.11/cicd/builds/understanding-buildconfigs.html) is used to debug driver building process. The Dockerfile section in [driver-build.yaml](driver-build.yaml) can be updated to debug the building and packaging of the driver container Image.

index.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. Intel Data Center GPU Driver for OpenShift documentation master file, created by
2+
sphinx-quickstart on Thu Feb 22 11:41:27 2024.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Intel® Data Center GPU Driver for OpenShift*
7+
======================================================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
README.md
14+
15+
.. toctree::
16+
:maxdepth: 2
17+
:caption: Release:
18+
19+
release/README.md
20+
21+
.. toctree::
22+
:maxdepth: 2
23+
:caption: Developers Guide:
24+
25+
debug/README.md

make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
docutils<0.18
2+
sphinx
3+
sphinx_rtd_theme
4+
recommonmark
5+
sphinx-markdown-tables
6+
sphinx-md
7+
myst_parser

0 commit comments

Comments
 (0)