Giter Site home page Giter Site logo

go-faiss's Introduction

go-faiss

  1. build faiss
brew install libomp
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
brew install swig

cd faiss

cmake \
-DFAISS_ENABLE_GPU=OFF \
-DFAISS_ENABLE_C_API=ON \
-DFAISS_ENABLE_PYTHON=OFF \
-DBUILD_SHARED_LIBS=ON \
-B build .

make -C build
  1. when run test or use
export DYLD_LIBRARY_PATH="${PWD}/faiss/build/c_api:$DYLD_LIBRARY_PATH"

the below came from original repo

Go Reference

Go bindings for Faiss, a library for vector similarity search.

Install

First you will need to build and install Faiss:

git clone https://github.com/facebookresearch/faiss.git
cd faiss
cmake -B build -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON .
make -C build
sudo make -C build install

Building will produce the dynamic library faiss_c. You will need to install it in a place where your system will find it (e.g. /usr/lib on Linux). You can do this with:

sudo cp build/c_api/libfaiss_c.so /usr/lib

Now you can install the Go module:

go get github.com/DataIntelligenceCrew/go-faiss

Usage

API documentation is available at https://pkg.go.dev/github.com/DataIntelligenceCrew/go-faiss. See the Faiss wiki for more information.

Examples can be found in the _example directory.

go-faiss's People

Contributors

p-ouellette avatar cigncloud avatar crumbjp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.