You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

documentation.md 2.0 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Documentation
  2. ## How to get a notebook rendered on the website
  3. See [here](https://github.com/microsoft/autogen/blob/main/notebook/contributing.md#how-to-get-a-notebook-displayed-on-the-website) for instructions on how to get a notebook in the `notebook` directory rendered on the website.
  4. ## Build documentation locally
  5. 1\. To build and test documentation locally, first install [Node.js](https://nodejs.org/en/download/). For example,
  6. ```bash
  7. nvm install --lts
  8. ```
  9. Then, install `yarn` and other required packages:
  10. ```bash
  11. npm install --global yarn
  12. pip install pydoc-markdown pyyaml termcolor
  13. ```
  14. 2\. You also need to install quarto. Please click on the `Pre-release` tab from [this website](https://quarto.org/docs/download/) to download the latest version of `quarto` and install it. Ensure that the `quarto` version is `1.5.23` or higher.
  15. 3\. Finally, run the following commands to build:
  16. ```console
  17. cd website
  18. yarn install --frozen-lockfile --ignore-engines
  19. pydoc-markdown
  20. python process_notebooks.py render
  21. yarn start
  22. ```
  23. The last command starts a local development server and opens up a browser window.
  24. Most changes are reflected live without having to restart the server.
  25. ## Build with Docker
  26. To build and test documentation within a docker container. Use the Dockerfile in the `dev` folder as described above to build your image:
  27. ```bash
  28. docker build -f .devcontainer/dev/Dockerfile -t autogen_dev_img https://github.com/microsoft/autogen.git#main
  29. ```
  30. Then start the container like so, this will log you in and ensure that Docker port 3000 is mapped to port 8081 on your local machine
  31. ```bash
  32. docker run -it -p 8081:3000 -v `pwd`/autogen-newcode:newstuff/ autogen_dev_img bash
  33. ```
  34. Once at the CLI in Docker run the following commands:
  35. ```bash
  36. cd website
  37. yarn install --frozen-lockfile --ignore-engines
  38. pydoc-markdown
  39. python process_notebooks.py render
  40. yarn start --host 0.0.0.0 --port 3000
  41. ```
  42. Once done you should be able to access the documentation at `http://127.0.0.1:8081/autogen`