Ubuntu

Dependencies

  • Install the following packages in your system if they not available yet:

    1
    2
    3
    
    sudo apt install \
        build-essential \
        clang
    
  • Bazel:

    1
    2
    3
    4
    
    curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
    echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
    sudo apt update
    sudo apt install bazel
    
  • LunarG Vulkan SDK:

    1
    2
    3
    4
    
    wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
    sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.211-focal.list https://packages.lunarg.com/vulkan/1.3.211/lunarg-vulkan-1.3.211-focal.list
    sudo apt update
    sudo apt install vulkan-sdk
    

    Verify that the SDK was successfully installed by running:

    1
    
    vulkaninfo
    
  • Python3 dependencies

    1
    
    sudo apt install python3-pip
    

Build C++ Libraries

Clone and compile Lluvia’s C++ libraries:

1
2
3
4
5
6
7
git clone https://github.com/jadarve/lluvia.git
cd lluvia

# install requirements listed in lluvia's root folder
sudo python3 -m pip install -r requirements.txt

bazel build //lluvia/cpp/...

Run the tests to verify that your compilation runs properly:

1
bazel test //lluvia/cpp/...

Python3 package

To build the Python3 package, execute the commands below from the repository’s top-level directory. You can create a virtual environment to isolate the installation:

1
2
bazel build //lluvia/python:lluvia_wheel
pip3 install bazel-bin/lluvia/python/lluvia-0.0.1-py3-none-any.whl

Open a Python3 interpreter and import lluvia:

1
2
3
import lluvia as ll

session = ll.createSession()

If the import completes successfully, lluvia is ready to use.


Last modified November 28, 2022: #118 Support Raspberry Pi 4 (#140) (06a2b56)