Skip to content

Commit

Permalink
Update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
pockerman committed Jul 10, 2022
1 parent 776a8cd commit 899ef18
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Python installation
- `Sphinx <https://www.sphinx-doc.org/en/master/>`_



.. code-block:: console
pip install -r requirements.txt
Expand All @@ -31,10 +30,15 @@ The C++ port of ``CubeAI`` has the following dependencies

- CMake
- Python >= 3.8
- `boost C++ libraries <https://www.boost.org/>`_
- `PyTorch C++ bindings <https://pytorch.org/>`_
- `Blaze <https://bitbucket.org/blaze-lib/blaze/src/master/>`_ (version >= 3.8)
- `Blaze <https://bitbucket.org/blaze-lib/blaze/src/master/>`_ (version >= 3.8) check `here <https://bitbucket.org/blaze-lib/blaze/wiki/Configuration%20and%20Installation>`_ how to configure and install Blaze
- Blas library, e.g. OpenBLAS (required by Blaze)
- `gymfcpp <https://github.com/pockerman/gym_from_cpp>`_
- `rlenvs_from_cpp <https://github.com/pockerman/rlenvs_from_cpp>`_
- `nlohmann_json <https://github.com/nlohmann/json>`_


If you choose PyTorch with CUDA then ```cuDNN``` library is also required. This is a runtime library containing primitives for deep neural networks.

Furthermore, CubeAI has the following integrated dependencies

Expand All @@ -50,18 +54,30 @@ Installation then follows the usual steps
make install
If you are using ```gymfcpp``` you need to export the path to the Python version you are using. For ecample:
If you are using ```rl_envs_from_cpp``` you need to export the path to the Python version you are using. For ecample:

.. code-block:: console
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/include/python3.8/"
or

.. code-block:: console
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/include/python3.10/"
Depending on the values of the ```CMAKE_BUILD_TYPE```, the produced shared library will be installed in ```CMAKE_INSTALL_PREFIX/dbg/``` or ```CMAKE_INSTALL_PREFIX/opt/``` directories.

Issues with C++ installation
----------------------------

- Could not find boost. On a Ubuntu machine you can install the boost libraries as follows

```
sudo apt-get install libboost-dev
```


- ``pyconfig.h`` not found

Expand All @@ -71,6 +87,14 @@ In this case we may have to export the path to your Python library directory as

``cubeai`` is using Blaze-3.8. As of this version the ``FIND_PACKAGE( blaze )`` command does not populate ``BLAZE_INCLUDE_DIRS`` therefore you manually have to set the variable appropriately for your system. So edit the project's ``CMakeLists.txt`` file and populate appropriately the variable ``BLAZE_INCLUDE_DIRS``.

- Could NOT find BLAS

The ```Blaze``` library depends on BLAS so it has to be installed. On a Ubuntu machine this can be doe as follows

```
sudo apt-get install libblas-dev liblapack-dev
```

Generate documentation
----------------------

Expand Down

0 comments on commit 899ef18

Please sign in to comment.