@@ -456,6 +456,47 @@ test-extra: prepare-test-extra
456456 $(MAKE ) -C backend/python/trl test
457457 $(MAKE ) -C backend/rust/kokoros test
458458
459+ # #
460+ # # End-to-end gRPC tests that exercise a built backend container image.
461+ # #
462+ # # The test suite in tests/e2e-backends is backend-agnostic. You drive it via env
463+ # # vars (see tests/e2e-backends/backend_test.go for the full list) and the
464+ # # capability-driven harness picks which gRPC RPCs to exercise:
465+ # #
466+ # # BACKEND_IMAGE Required. Docker image to test, e.g. local-ai-backend:llama-cpp.
467+ # # BACKEND_TEST_MODEL_URL URL of a model file to download and load.
468+ # # BACKEND_TEST_MODEL_FILE Path to an already-downloaded model (skips download).
469+ # # BACKEND_TEST_CAPS Comma-separated capabilities, default "health,load,predict,stream".
470+ # # BACKEND_TEST_PROMPT Override the prompt used in predict/stream specs.
471+ # #
472+ # # Direct usage (image already built, no docker-build-* dependency):
473+ # #
474+ # # make test-extra-backend BACKEND_IMAGE=local-ai-backend:llama-cpp \
475+ ## BACKEND_TEST_MODEL_URL=https://.../model.gguf
476+ # #
477+ # # Convenience wrappers below build a specific backend image first, then run the
478+ # # suite against it.
479+ # #
480+ BACKEND_TEST_MODEL_URL? =https://huggingface.co/Qwen/Qwen3-0.6B-GGUF/resolve/main/Qwen3-0.6B-Q8_0.gguf
481+
482+ # # Generic target — runs the suite against whatever BACKEND_IMAGE points at.
483+ # # Depends on protogen-go so pkg/grpc/proto is generated before `go test`.
484+ test-extra-backend : protogen-go
485+ @test -n " $$ BACKEND_IMAGE" || { echo " BACKEND_IMAGE must be set" >&2 ; exit 1; }
486+ BACKEND_IMAGE=" $$ BACKEND_IMAGE" \
487+ BACKEND_TEST_MODEL_URL=" $$ {BACKEND_TEST_MODEL_URL:-$( BACKEND_TEST_MODEL_URL) }" \
488+ BACKEND_TEST_MODEL_FILE=" $$ BACKEND_TEST_MODEL_FILE" \
489+ BACKEND_TEST_CAPS=" $$ BACKEND_TEST_CAPS" \
490+ BACKEND_TEST_PROMPT=" $$ BACKEND_TEST_PROMPT" \
491+ go test -v -timeout 15m ./tests/e2e-backends/...
492+
493+ # # Convenience wrappers: build the image, then exercise it.
494+ test-extra-backend-llama-cpp : docker-build-llama-cpp
495+ BACKEND_IMAGE=local-ai-backend:llama-cpp $(MAKE ) test-extra-backend
496+
497+ test-extra-backend-ik-llama-cpp : docker-build-ik-llama-cpp
498+ BACKEND_IMAGE=local-ai-backend:ik-llama-cpp $(MAKE ) test-extra-backend
499+
459500DOCKER_IMAGE? =local-ai
460501IMAGE_TYPE? =core
461502BASE_IMAGE? =ubuntu:24.04
@@ -549,6 +590,8 @@ backend-images:
549590# Backend metadata: BACKEND_NAME | DOCKERFILE_TYPE | BUILD_CONTEXT | PROGRESS_FLAG | NEEDS_BACKEND_ARG
550591# llama-cpp is special - uses llama-cpp Dockerfile and doesn't need BACKEND arg
551592BACKEND_LLAMA_CPP = llama-cpp|llama-cpp|.|false|false
593+ # ik-llama-cpp is a fork of llama.cpp with superior CPU performance
594+ BACKEND_IK_LLAMA_CPP = ik-llama-cpp|ik-llama-cpp|.|false|false
552595
553596# Golang backends
554597BACKEND_PIPER = piper|golang|.|false|true
@@ -619,6 +662,7 @@ endef
619662
620663# Generate all docker-build targets
621664$(eval $(call generate-docker-build-target,$(BACKEND_LLAMA_CPP)))
665+ $(eval $(call generate-docker-build-target,$(BACKEND_IK_LLAMA_CPP)))
622666$(eval $(call generate-docker-build-target,$(BACKEND_PIPER)))
623667$(eval $(call generate-docker-build-target,$(BACKEND_LOCAL_STORE)))
624668$(eval $(call generate-docker-build-target,$(BACKEND_HUGGINGFACE)))
@@ -663,7 +707,7 @@ $(eval $(call generate-docker-build-target,$(BACKEND_SAM3_CPP)))
663707docker-save-% : backend-images
664708 docker save local-ai-backend:$* -o backend-images/$* .tar
665709
666- docker-build-backends : docker-build-llama-cpp docker-build-rerankers docker-build-vllm docker-build-vllm-omni docker-build-transformers docker-build-outetts docker-build-diffusers docker-build-kokoro docker-build-faster-whisper docker-build-coqui docker-build-chatterbox docker-build-vibevoice docker-build-moonshine docker-build-pocket-tts docker-build-qwen-tts docker-build-fish-speech docker-build-faster-qwen3-tts docker-build-qwen-asr docker-build-nemo docker-build-voxcpm docker-build-whisperx docker-build-ace-step docker-build-acestep-cpp docker-build-voxtral docker-build-mlx-distributed docker-build-trl docker-build-llama-cpp-quantization docker-build-kokoros docker-build-sam3-cpp docker-build-qwen3-tts-cpp
710+ docker-build-backends : docker-build-llama-cpp docker-build-ik-llama-cpp docker-build- rerankers docker-build-vllm docker-build-vllm-omni docker-build-transformers docker-build-outetts docker-build-diffusers docker-build-kokoro docker-build-faster-whisper docker-build-coqui docker-build-chatterbox docker-build-vibevoice docker-build-moonshine docker-build-pocket-tts docker-build-qwen-tts docker-build-fish-speech docker-build-faster-qwen3-tts docker-build-qwen-asr docker-build-nemo docker-build-voxcpm docker-build-whisperx docker-build-ace-step docker-build-acestep-cpp docker-build-voxtral docker-build-mlx-distributed docker-build-trl docker-build-llama-cpp-quantization docker-build-kokoros docker-build-sam3-cpp docker-build-qwen3-tts-cpp
667711
668712# #######################################################
669713# ## Mock Backend for E2E Tests
0 commit comments