Forum OpenACS Development: Re: Semantic Search in OpenACS

Collapse
Posted by Neophytos Demetriou on
I've created a Dockerfile so you can try this out without much hassle. Here are the commands for your convenience:

git clone --recurse-submodules https://github.com/jerily/tbert.git
cd tbert
docker build . -t tbert:latest
docker run --rm -it --entrypoint bash tbert:latest

Then, inside the container:

cd tbert/build
tclsh8.6 ../example.tcl ../bert.cpp/models/all-MiniLM-L12-v2/ggml-model-q4_0.bin

You can even copy the model as follows:

id=$(docker create tbert:latest)
docker cp $id:/tbert/bert.cpp/models/all-MiniLM-L12-v2/ggml-model-q4_0.bin .
docker rm -v $id
ls -la ggml-model-q4_0.bin

This is likely the approach to go with models i.e. download a couple of models inside the docker container and then copy them over to the host machine to try them out on your openacs instance.