The following guide will help you build a local version of the Python API website, so that you may work on and test any contributions.
It is recommended that you read the MXNet developer wiki‘s info on building the website & docs as that includes info on how to test and build the site using Docker. The following information should only be used if you can’t use Docker or if you're trying to run the site locally.
The default configuration requires a GPU and CUDA 9.2 and expects Ubuntu. However, you may setup the website on macOS or Windows with or without a GPU.
You can update Conda with the following:
conda update conda
To run the full build, including tests of all tutorials, you will need at least two GPUs. Distributed training is a key feature of MXNet, so multiple GPUs are required for running through every tutorial.
In the environment.yml
file:
mxnet-cu92
to mxnet
.In the environment.yml
file:
mxnet-cu92
to mxnet
. (There is no CUDA package for mac anyway.)pytorch-cpu
to pytorch
.torchvision-cpu
to torchvision
.If you have a GPU and have installed CUDA 9.2 you can leave the MXNet dependency alone. Otherwise, in the environment.yml
file:
mxnet-cu92
to mxnet
.Install recommended software:
Conda
in PATH
make
from a git bash
terminal with Admin rightschoco to install make
choco
, make
, and conda
commands should work in git bash
.Run the following commands from the project root (python-docs
) to setup the environment.
conda env create -f environment.yml source activate mxnet-docs
python-docs/python
.To build without GPUs and without testing the notebooks (faster):
make EVAL=0
To build with testing the notebooks (requires GPU):
make
The build docs will be available at build/_build/html
.
Each build may take a few minutes even without evaluation. To accelerate it, we can use one of the following ways:
build/conf.py
, add the folders you want to skip into exclude_patterns
, such as exclude_patterns = ['templates', 'api', 'develop', 'blog']
.mv api /tmp/
, and then make clean
.To run a server to see the website:
cd build/_build/html; python -m http.server
ssh -L8000:localhost:8000 your_machine
In addition to view the built html pages, you can run the Jupyter notebook from a remote machine.
notedown
plugin: pip install https://github.com/mli/notedown/tarball/master
in remote serverjupyter notebook --NotebookApp.contents_manager_class='notedown.NotedownContentsManager'
in remote serverssh -L8888:localhost:8888 your_machine
Optionally, one can run the following to launch the notedown plugin automatically when starting jupyter notebook.
~/.jupyter/jupyter_notebook_config.py
if it is not existing by run jupyter notebook --generate-config
c.NotebookApp.contents_manager_class = 'notedown.NotedownContentsManager'
to ~/.jupyter/jupyter_notebook_config.py
jupyter notebook
Dependencies and the setup steps for this website are changing often. Here are some troubleshooting tips.
conda env update -f environment.yml