Adding lexical/semantic eval tools to Ollama Docker image#364
Draft
tefirman wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Adds the Python dependencies needed by the WDL functional-eval pipeline (lexical/semantic similarity scoring and HuggingFace embedding loading) directly into the
getwilds/ollamaimage so callers no longer have topip installthem at runtime. Previously,wilds-wdl-writer'swdl_writer/benchmarking.py(run viabenchmarking.wdl) crashed on import because the image only shippedollamaandchromadb.New packages, with pins matching a fresh install today:
rapidfuzz==3.14.5— fast string similarity for lexical evalsentence-transformers==5.5.1— embedding models for semantic similarityllama-index-embeddings-huggingface==0.7.0— the adapterbenchmarking.pyimports directlytorch==2.12.0+cpu— installed first fromhttps://download.pytorch.org/whl/cpuso the CUDA wheels (multi-GB) are skipped. Ollama owns the GPU; the embedding model runs on CPU. The smoke test assertsnot torch.cuda.is_available()to catch regressions if a future change accidentally pulls in the CUDA build.Applied identically to
Dockerfile_0.21.0andDockerfile_latest. README updated: intro mentions lexical/semantic eval support, Image Details and Dockerfile Structure list the new packages, and citations were added for sentence-transformers and PyTorch.Testing
How did you test these changes?
make lint IMAGE=ollama— hadolint passes on both Dockerfiles.rapidfuzz,torch+ CPU-only assertion,sentence_transformers,from llama_index.embeddings.huggingface import HuggingFaceEmbedding) as part of the build.Did the tests pass?
Yes — lint clean and local build succeeded.
Checklist
Dockerfile_X.Y.ZorDockerfile_latest)README.mdis included/updated in the tool directorymake validate IMAGE=toolname(or manually built and verified)