Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. To start from scratch, fire up a Ubuntu 16.04 EC2 instance with at least 20 GB of space. More is better if you're doing a lot of testing. A c5c5d.16xlarge 4xlarge with 60GB SSD 100GB SSD is recommended. If you have recently built the docs and you're looking to understand the new pipeline, a.k.a. Fawkes, and its features, skip ahead to Step 2. If you haven't already, you need to fork the MXNet repo. Go to https://github.com/apache/incubator-mxnet and click the Fork button in the upper right.
    1. From your instance, clone the MXNet repo with:

      git clone --recursive https://github.com/apache<your-fork>/incubator-mxnet
      ---or---
      Or... if you just want to build what's in the main repo, you can clone that instead:

      git clone --recursive https://github.com/<your-fork>apache/incubator-mxnet


    2. Then run the setup script:

      cd incubator-mxnet/docs/build_version_doc/ && ./setup_docs_ubuntu.sh

    3. You will see instructions for turning on mod rewrite. This will activate redirects, and this step is optional.
    4. You will need to open up HTTP (port 80) on the server for all traffic (since you want to share the preview link, right?). Do this from the EC2 console security group settings. The firewall on the server is already opened.

  2. If you have a working setup with all of the dependencies, start with a clone or fork of MXNet. From here let's assume you are using your own fork.
  3. Checkout the branch you want to preview on the site.
  4. Navigate to the `docs` directory.
  5. Open `settings.ini` for editing.
  6. Review each section. 
    1. It is broken up by version showing both the version's tag and branch. Branches have a "v" before the version number.
    2. Each section lists the language APIs and which one will be run for each version. 
  7. For a development fork and branch, the "document_sets_default" section will apply. Turn on the APIs you want to run. The Python API runs no matter what. Turn all the others off. For your final test it is a good idea to turn everything back on. For example, this is a configuration to run Python plus the Scala docs:
    [document_sets_default] 
    clojure_docs = 0
    doxygen_docs = 0 
    r_docs = 0 
    scala_docs = 1


  8. Save the settings file.
  9. Run `make html`. You can also use `make html USE_OPENMP=1` which seems to make it a bit faster on Ubuntu. 
    1. Note: This will not work by default on macOS, so just do `make html` or go through the setup to enable OpenMP on macOS.
  10. The output will be in the `docs/_build/html` folder. Clean out the Apache web server folder (remnant files can mess up your testing and validation), then copy the new website content to it with:
    sudo rm -rf /var/www/html/* && sudo cp -a ~/incubator-mxnet/docs/_build/html/* /var/www/html/

  11. Find the public IP for your instance on your EC2 console and copy it. If you didn't open it up for HTTP yet, now's the time. You can view the site in your browser by the visiting the IP you copied.

...