This repository contains a Sphinx-based documentation for the InfiniBand, as well as corresponding code examples.
https://docs.nvidia.com/networking/display/mlnxofedv531001
托管到 https://readthedocs.org/ ,不需要把构建内容上传到 github ,readthedocs 会自动构建。
将环境依赖写入 requirements.txt
方法一:使用虚拟环境
- 使用虚拟环境
创建一个虚拟环境来管理你的项目依赖。虚拟环境只会列出该环境内安装的包,而不会包括全局包。
# 创建虚拟环境
python -m venv venv
# 激活虚拟环境
source venv/bin/activate- 在虚拟环境中安装项目依赖
pip install package-name- 运行 pip freeze 生成 requirements.txt:
pip freeze > requirements.txt方法二:使用 pipreqs
pipreqs 是一个工具,它会扫描项目目录,自动生成 requirements.txt,并且只会将当前项目中实际用到的包列出,而不会包括你没有直接使用的包。
- 安装
pipreqs
pip install pipreqs- 在项目目录中运行
pipreqs
pipreqs /path/to/your/projectTo build and/or contribute to this documentation, you must have a Sphinx and
a few related extensions installed. These can be installed as follows using
Python's pip.
pip install sphinx
pip install sphinx-rtd-theme
pip install sphinx_copybutton
pip install recommonmark
pip install breathe
pip install jieba
Alternately, those required packages may also be avaible in your
platform's primary package manager. For example, in Ubuntu 23.04 you
could do the following instead of using pip:
sudo apt install python3-breathe python3-recommonmark python3-sphinx-copybutton python3-sphinx-rtd-theme python3-jieba
You must also install the doxygen documentation system. This is likely
avaible in your platform's primary package manager. For example on Ubuntu:
sudo apt install doxygen
Once you have these dependencies installed, clone this
repository and cd into it. You can change the documentation
by editing the files in the source subdirectory (these files
use the .rst format). You can build the documentation using
the following command.
cd docs
make html