Install Linux

Installation (Ubuntu 18.04)

Dependencies

Install the following packages in your system if they are still not available:

1
2
3
4
apt install \
    build-essential \
    cmake \
    clang

Install Bazel:

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

Install the LunarG Vulkan SDK.

1
2
3
4
5
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc >> lunarg-signing-key-pub.asc
apt-key add lunarg-signing-key-pub.asc
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.1.121-bionic.list http://packages.lunarg.com/vulkan/1.1.121/lunarg-vulkan-1.1.121-bionic.list
apt-get update 
apt-get install lunarg-vulkan-sdk

Verify that the SDK was successfully installed by running:

1
vulkaninfo

Build C++ Libraries

Clone and compile Lluvia’s C++ libraries:

1
2
3
4
git clone https://github.com/jadarve/lluvia.git

cd lluvia
CC=clang bazel build //cpp/...

Run the tests to verify that your compilation runs properly:

1
CC=clang bazel test //...

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
3
4
5
6
7
8
9
# build C++ libraries the python wrappers depend on
CC=clang bazel build //cpp/core:core_cc_library
CC=clang bazel build @lua//:lua_cc_library

cd python
pip3 install -r requirements.txt

CC=clang python3 setup.py build bdist_wheel
pip3 install dist/lluvia-0.0.1-cp36-cp36m-linux_x86_64.whl

Open a Python3 interpreter and import lluvia package

1
import lluvia as ll

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