-
Notifications
You must be signed in to change notification settings - Fork 16
Making the dockerfile and code ready for kagent. #63
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b79475e
Making the dockerfile and code ready for kagent.
7b76c01
Adding proper docstrings
f0a723e
Adding a shorter docstring
0760d1a
removing reduntant parts of readme
698158a
Bumped minor version
44ca66e
Merge branch 'main' into main
papagala 72de7f6
fix(main): Fix formatting
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,58 @@ | ||
| # Makefile for M3 Docker Image Build and Push | ||
| DOCKER ?= docker | ||
| IMAGE_NAME := m3-mimic-demo | ||
| IMAGE_TAG ?= 0.4.0 | ||
|
|
||
| # Prompt for registry only if not set | ||
| ifndef DOCKER_REGISTRY | ||
| DOCKER_REGISTRY := $(shell bash -c 'read -p "Enter Docker registry/username: " registry; echo $${registry}') | ||
| endif | ||
|
|
||
| DOCKER_IMAGE := $(DOCKER_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) | ||
|
|
||
| DB_FILE := m3_data/databases/mimic_iv_demo.db | ||
|
|
||
| .PHONY: help | ||
| help: ## Show help | ||
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-20s %s\n", $$1, $$2}' | ||
|
|
||
| .PHONY: all | ||
| all: download-db build push ## Complete workflow: download DB, build and push | ||
|
|
||
| .PHONY: login | ||
| login: ## Login to Docker Hub | ||
| @$(DOCKER) login docker.io | ||
|
|
||
| .PHONY: download-db | ||
| download-db: ## Download MIMIC-IV demo database | ||
| @uv sync | ||
| @uv run m3 init mimic-iv-demo | ||
|
|
||
| .PHONY: build | ||
| build: ## Build Docker image (lite version) | ||
| @test -f $(DB_FILE) || { echo "Run 'make download-db' first"; exit 1; } | ||
| @$(DOCKER) build --target lite -t $(DOCKER_IMAGE) -t $(DOCKER_REGISTRY)/$(IMAGE_NAME):lite . | ||
|
|
||
| .PHONY: build-bigquery | ||
| build-bigquery: ## Build BigQuery version | ||
| @test -f $(DB_FILE) || { echo "Run 'make download-db' first"; exit 1; } | ||
| @$(DOCKER) build --target bigquery -t $(DOCKER_REGISTRY)/$(IMAGE_NAME):bigquery . | ||
|
|
||
| .PHONY: push | ||
| push: ## Push Docker image to registry (run 'make login' first) | ||
| @$(DOCKER) push $(DOCKER_IMAGE) | ||
| @$(DOCKER) push $(DOCKER_REGISTRY)/$(IMAGE_NAME):lite | ||
|
|
||
| .PHONY: push-bigquery | ||
| push-bigquery: ## Push BigQuery image (run 'make login' first) | ||
| @$(DOCKER) push $(DOCKER_REGISTRY)/$(IMAGE_NAME):bigquery | ||
|
|
||
| .PHONY: test-image | ||
| test-image: ## Test the built Docker image | ||
| @$(DOCKER) run --rm $(DOCKER_IMAGE) python -c "import m3; print(f'M3 version: {m3.__version__}')" | ||
|
|
||
| .PHONY: clean | ||
| clean: ## Remove database and raw files | ||
| @rm -rf m3_data | ||
|
|
||
| .DEFAULT_GOAL := help |
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
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.