Skip to content

docker-compose.yaml default model phi-2 no longer exists in the gallery #11974

Description

@alaschgari

LocalAI version:
quay.io/go-skynet/local-ai:master-gpu-nvidia-cuda-13 (sha256:02e823f5f25ddef3f4edb94a8960e506daa4f71595d7c75b041d52b6eaaf425b, LocalAI bcf196d), docker-compose.yaml at the same commit.

Environment, CPU architecture, OS, and Version:
Docker Desktop 29.7.2 (Compose 5.5.1) on Windows 11 (WSL2), x86_64.

Describe the bug
docker-compose.yaml starts LocalAI with command: [phi-2], but the gallery has no phi-2 entry anymore. gallery/index.yaml only has phi-2-chat, phi-2-chat:Q8_0 and phi-2-orange. On a fresh docker compose up, the gallery lookup fails, startup falls through to the autoimporter, which can't handle a bare name, and LocalAI comes up with no model installed. For people following the quickstart, the first thing they see is an error.

There is also a small bug in how that error is reported. core/startup/model_preload.go:57 does

err = errors.Join(discoverErr, fmt.Errorf("failed to discover model config: %w", err))

It wraps the accumulated err (still nil at that point) instead of discoverErr. This produces the log line failed to discover model config: %!w(<nil>). Line 44 (xlog.Error("[startup] failed installing model", "error", err, ...)) has the same pattern: it logs the accumulated err instead of the per-model e.

To Reproduce

  1. docker compose up -d with the repository's docker-compose.yaml.
  2. docker compose logs api

Expected behavior
The default compose file installs a working model, or at least one that exists in the gallery, and the error message names the actual error.

Logs

ERROR [startup] failed to discover model config error=no importer matched for phi-2 model="phi-2"
ERROR error installing models error=no importer matched for phi-2
failed to discover model config: %!w(<nil>)

Additional context
Suggested fixes: point the compose default at an existing gallery entry (for example phi-2-chat, or a more current small model), and wrap discoverErr / log e in model_preload.go.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions