diff --git a/README.md b/README.md index 41ba89f3a..60c71d6cb 100644 --- a/README.md +++ b/README.md @@ -10,46 +10,6 @@ Python bindings for C++ depthai-core library Documentation is available over at [Luxonis DepthAI API](https://docs.luxonis.com/projects/api/en/latest/) -### Building documentation - -- **Using [Docker](https://docs.docker.com/) (with [Docker Compose](https://docs.docker.com/compose/install/))** - - ``` - cd docs - docker-compose build - docker-compose up - ``` - - Then open [http://localhost:8000](http://localhost:8000). - - This docker container will watch changes in the `docs/source` directory and rebuild the docs automatically - -- **Linux** - - First, please install the required [dependencies](#Dependencies) - - Then run the following commands to build the docs website - - ``` - python3 -m pip install -U pip - python3 -m pip install -r docs/requirements.txt - cmake -S . -B build -D DEPTHAI_BUILD_DOCS=ON -D DEPTHAI_PYTHON_BUILD_DOCS=ON - cmake --build build --target sphinx --parallel - python3 -m http.server --bind 0.0.0.0 8000 --directory build/docs/sphinx - ``` - - Then open [http://localhost:8000](http://localhost:8000). - - This will build documentation based on current sources, so if some new changes will be made, run this command - in a new terminal window to update the website source - - ``` - cmake --build build --target sphinx --parallel - ``` - - Then refresh your page - it should load the updated website that was just built - - ## Installation Prebuilt wheels are available in [Luxonis repository](https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/) @@ -108,6 +68,48 @@ ctest - Raspbian 10; - macOS 10.14.6, 10.15.4; + +### Building documentation + +- **Using [Docker](https://docs.docker.com/) (with [Docker Compose](https://docs.docker.com/compose/install/))** + + ``` + cd docs + sudo docker-compose build + sudo docker-compose up + ``` + + > ℹ️ You can leave out the `sudo` if you have added your user to the `docker` group (or are using rootless docker). + + Then open [http://localhost:8000](http://localhost:8000). + + This docker container will watch changes in the `docs/source` directory and rebuild the docs automatically + +- **Linux** + + First, please install the required [dependencies](#Dependencies) + + Then run the following commands to build the docs website + + ``` + python3 -m pip install -U pip + python3 -m pip install -r docs/requirements.txt + cmake -S . -B build -D DEPTHAI_BUILD_DOCS=ON -D DEPTHAI_PYTHON_BUILD_DOCS=ON + cmake --build build --parallel --target sphinx + python3 -m http.server --bind 0.0.0.0 8000 --directory build/docs/sphinx + ``` + + Then open [http://localhost:8000](http://localhost:8000). + + This will build documentation based on current sources, so if some new changes will be made, run this command + in a new terminal window to update the website source + + ``` + cmake --build build --parallel --target sphinx + ``` + + Then refresh your page - it should load the updated website that was just built + ## Troubleshooting ### Relocation link error diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml index e2f450637..dc27094a3 100644 --- a/docs/docker-compose.yml +++ b/docs/docker-compose.yml @@ -1,3 +1,4 @@ +version: "3" services: docs: build: