Skip to content

Docker: Embedding Issue & possible Fix #6267

Open
@adrianliechti

Description

@adrianliechti

When running the Docker Image (CPU or CUDA) and run an embedding model, I get this error

nomic-embed-text-1  | terminate called after throwing an instance of 'std::runtime_error'
nomic-embed-text-1  |   what():  locale::facet::_S_create_c_locale name not valid

When installing the locale pack on start with something like this, everythings works as expected

nomic-embed-text:
    image: ghcr.io/ggerganov/llama.cpp:server
    pull_policy: always
    entrypoint: ""
    command: /bin/bash -c "apt-get update && apt-get install locales && locale-gen en_US.UTF-8 && update-locale && /server --host 0.0.0.0 --port 8000 --log-disable --ctx-size 8192 --embedding --model /models/nomic-embed-text-v1.5.Q4_K_M.gguf"
    volumes:
      - ../../models:/models
curl http://localhost:8080/oai/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "input": "Hello!",
    "model": "nomic-embed-text"
  }'

maybe it is worth to install / update the locals in the base image (or change the code to adapt to invariant-culture?)
https://stackoverflow.com/questions/28405902/how-to-set-the-locale-inside-a-debian-ubuntu-docker-container

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions