Skip to content

Commit

Permalink
Initial milvus container
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmueller committed Nov 20, 2024
1 parent 3410ae6 commit 679176d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bci_build/package/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,7 @@ def generate_disk_size_constraints(size_gb: int) -> str:
from .kiwi import KIWI_CONTAINERS # noqa: E402
from .mariadb import MARIADB_CLIENT_CONTAINERS # noqa: E402
from .mariadb import MARIADB_CONTAINERS # noqa: E402
from .milvus import MILVUS_CONTAINERS # noqa: E402
from .node import NODE_CONTAINERS # noqa: E402
from .openjdk import OPENJDK_CONTAINERS # noqa: E402
from .php import PHP_CONTAINERS # noqa: E402
Expand Down Expand Up @@ -1502,6 +1503,7 @@ def generate_disk_size_constraints(size_gb: int) -> str:
*GOLANG_CONTAINERS,
*KIWI_CONTAINERS,
*RUBY_CONTAINERS,
*MILVUS_CONTAINERS,
*NODE_CONTAINERS,
*OPENJDK_CONTAINERS,
*PHP_CONTAINERS,
Expand Down
58 changes: 58 additions & 0 deletions src/bci_build/package/milvus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"""Build description for the milvus Container Images"""

import datetime

from bci_build.containercrate import ContainerCrate
from bci_build.os_version import CAN_BE_LATEST_OS_VERSION
from bci_build.os_version import OsVersion
from bci_build.package import DOCKERFILE_RUN
from bci_build.package import ApplicationStackContainer
from bci_build.package import OsContainer
from bci_build.package import Replacement
from bci_build.package import _build_tag_prefix
from bci_build.registry import publish_registry


MILVUS_CONTAINERS = [
ApplicationStackContainer(
name="milvus",
package_name=(None if os_version.is_tumbleweed else "sac-milvus-cpu-image"),
_publish_registry=publish_registry(os_version, app_collection=True),
pretty_name="Milvus",
custom_description=(
"Milvus is a high-performance, highly scalable vector database that runs efficiently "
"across a wide range of environments."
)
+ (". It is {based_on_container}." if os_version.is_tumbleweed else "."),
os_version=os_version,
is_latest=(
(os_version in CAN_BE_LATEST_OS_VERSION) and os_version.is_tumbleweed
),
version="%%milvus_version%%",
license="Apache-2.0",
supported_until=datetime.date(2025, 12, 31),
from_target_image=f"{_build_tag_prefix(os_version)}/bci-micro:{OsContainer.version_to_container_os_version(os_version)}",
package_list=[
"libglog-4-0",
"etcd",
"minio-client",
"tini",
"milvus",
"milvus-cppcpu",
],
replacements_via_service=[
Replacement(
regex_in_build_description="%%milvus_version%%", package_name="milvus"
),
],
custom_end=rf"""{DOCKERFILE_RUN} mkdir /milvus && ln -s /etc/milvus/configs/ /milvus""",
entrypoint=["/usr/bin/tini"],
# logo_url="https://tomcat.apache.org/res/images/tomcat.png",
)
for os_version in (
OsVersion.TUMBLEWEED,
# OsVersion.AI,
)
]

MILVUS_CRATE = ContainerCrate(MILVUS_CONTAINERS)

0 comments on commit 679176d

Please sign in to comment.