-
Notifications
You must be signed in to change notification settings - Fork 76
feat(devx): local dev setup for control plane and full end-to-end flow (MLI-6681) #823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lilyz-ai
wants to merge
13
commits into
main
Choose a base branch
from
lilyz-ai/mli-6681-control-plane-local-devx
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a9453f5
chore: bump model-engine image tag to latest main (2e9d0078)
lilyz-ai 0212a9c
feat(devx): add local control plane dev setup (MLI-6681)
lilyz-ai 59e8a2f
fix(devx): use cache_redis_onprem_url and pin ML_INFRA_SERVICES_CONFI…
lilyz-ai 2679726
fix(devx): pin infra config in manual example and add postgres volume
lilyz-ai df1f000
fix(devx): use docker compose --wait instead of unbounded polling loops
lilyz-ai 957f573
feat(devx): add full end-to-end local flow with kind (MLI-6681)
lilyz-ai 0c42fc8
fix(devx): align celery_task_queue_gateway backend_protocol for onprem
lilyz-ai f649274
fix(test): include otlp.proto.grpc in OTEL_AVAILABLE guard
lilyz-ai 63c513f
Merge remote-tracking branch 'origin/main' into lilyz-ai/mli-6681-con…
lilyz-ai 89336be
fix(ci): fix black/isort formatting and FastAPI 0.135 API compat in s…
lilyz-ai f15a827
fix(ci): revert schema_generator from gateway — FastAPI 0.135.1 API d…
lilyz-ai dd8e8c0
docs(devx): replace curl endpoint example with launch-python-client e…
lilyz-ai f781623
Merge branch 'main' into lilyz-ai/mli-6681-control-plane-local-devx
lilyz-ai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| .PHONY: install dev-up dev-down dev-migrate dev-server test | ||
|
|
||
| MODEL_ENGINE_DIR := $(abspath .) | ||
| DB_URL := postgresql://postgres:password@localhost:5432/llm_engine | ||
|
|
||
| # Local dev environment variables | ||
| LOCAL_ENV := \ | ||
| LOCAL=true \ | ||
| GIT_TAG=local \ | ||
| ML_INFRA_DATABASE_URL=$(DB_URL) \ | ||
| DEPLOY_SERVICE_CONFIG_PATH=$(MODEL_ENGINE_DIR)/service_configs/service_config_local.yaml \ | ||
| ML_INFRA_SERVICES_CONFIG_PATH=$(MODEL_ENGINE_DIR)/model_engine_server/core/configs/default.yaml | ||
|
|
||
| install: | ||
| pip install -r requirements.txt -r requirements-test.txt -r requirements_override.txt | ||
| pip install -e . | ||
|
|
||
| dev-up: | ||
| docker compose -f docker-compose.local.yml up -d | ||
| @echo "Waiting for services to be healthy..." | ||
| @until docker compose -f docker-compose.local.yml exec postgres pg_isready -U postgres -q; do sleep 1; done | ||
| @echo "Postgres ready." | ||
| @until docker compose -f docker-compose.local.yml exec redis redis-cli ping | grep -q PONG; do sleep 1; done | ||
| @echo "Redis ready." | ||
|
|
||
| dev-down: | ||
| docker compose -f docker-compose.local.yml down | ||
|
|
||
| dev-migrate: | ||
| $(LOCAL_ENV) bash model_engine_server/db/migrations/run_database_migration.sh | ||
|
|
||
| dev-server: | ||
| $(LOCAL_ENV) start-fastapi-server --port 5000 --num-workers 1 --debug | ||
|
|
||
| test: | ||
| pytest tests/unit/ | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:15 | ||
| environment: | ||
| POSTGRES_PASSWORD: password | ||
| POSTGRES_DB: llm_engine | ||
| ports: | ||
| - "5432:5432" | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U postgres"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 | ||
|
|
||
| redis: | ||
| image: redis:7 | ||
| ports: | ||
| - "6379:6379" | ||
| healthcheck: | ||
| test: ["CMD", "redis-cli", "ping"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| gateway_namespace: default | ||
| endpoint_namespace: model-engine | ||
| model_primitive_host: "none" | ||
|
|
||
| # Local Redis (started via docker-compose.local.yml) | ||
| # Use onprem_url so it's checked before cloud_provider assertions | ||
| cache_redis_onprem_url: redis://localhost:6379/15 | ||
|
|
||
| sqs_profile: nonexistent_sqs_profile | ||
| sqs_queue_policy_template: > | ||
| { | ||
| "Version": "2012-10-17", | ||
| "Statement": [] | ||
| } | ||
| sqs_queue_tag_template: > | ||
| {} | ||
|
|
||
| billing_queue_arn: none | ||
| cloud_file_llm_fine_tune_repository: "s3://local-bucket/fine_tune_repository/local" | ||
|
|
||
| dd_trace_enabled: false | ||
| istio_enabled: false | ||
| sensitive_log_mode: false | ||
| tgi_repository: "text-generation-inference" | ||
| vllm_repository: "vllm" | ||
| lightllm_repository: "lightllm" | ||
| tensorrt_llm_repository: "tensorrt-llm" | ||
| batch_inference_vllm_repository: "llm-engine/batch-infer-vllm" | ||
| user_inference_base_repository: "launch/inference" | ||
| user_inference_pytorch_repository: "hosted-model-inference/async-pytorch" | ||
| user_inference_tensorflow_repository: "hosted-model-inference/async-tensorflow-cpu" | ||
| docker_image_layer_cache_repository: "kaniko-cache" | ||
| hf_user_fine_tuned_weights_prefix: "s3://local-bucket/model-weights" |
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.
Uh oh!
There was an error while loading. Please reload this page.