This is a rough guide for compiling CandidateVectorSearch on Ubuntu, which should generally work on most Linux-based systems.
The following dependencies are required for compilation:
- gcc / g++:
sudo apt-get install -y gcc g++
- dotnet [more info]:
- dotnet-sdk-6.0:
sudo apt-get install -y dotnet-sdk-6.0
- dotnet-runtime-6.0:
sudo apt-get install -y dotnet-runtime-6.0
- dotnet-sdk-6.0:
- Additional dependencies may be required, please check
Dockerfile
to see a full list!
Alternatively, a Docker image with all necessary build tools is also available
via Dockerfile
:
- Build the Dockerfile:
docker build . -f Dockerfile -t cvs
- Run the container:
docker run -it cvs
To build the C++ library used for matrix multiplication the following steps are required:
- Navigate to the
VectorSearch
directory:cd VectorSearch
- Build the DLL:
g++ -shared -I eigen-3.4.0 -fPIC -fopenmp -O3 -o VectorSearch.dll dllmainUnix.cpp
To build the C# testing application the following steps need to be carried out:
- Navigate to the
DataLoader
directory:cd DataLoader
- Build the executable:
dotnet publish DataLoader.csproj --runtime ubuntu.22.04-x64 --self-contained --configuration Release
- [Alternatively:
dotnet publish DataLoader.csproj --runtime linux-x64 --self-contained --configuration Release
]
- Copy
VectorSearch.dll
to the build directory ofDataLoader
. - Run the executable. For example with
./DataLoader EigenSIntB 10000
. - Note that we only supply the compiled binaries for CPU-based search. If you want
to run GPU-based searches please compile
VectorSearchCUDA
yourself!
We provide compiled binaries in DataLoaderExecutable/ubuntu22.04_x64
and in the
Releases
tab. Please again note that we only supply the compiled binaries for
CPU-based search. If you want to run GPU-based searches please compile
VectorSearchCUDA
yourself! Running the compiled binaries requires
dotnet-runtime-6.0
and g++
.