Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion federal/Dockerfile.chainguard
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM cgr.dev/scale.com/python-fips:3.10.15-dev
WORKDIR /workspace
USER root

RUN apk add htop \
RUN apk update && apk add htop \
dumb-init \
libssh \
openssh-client \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Add passthrough forwarder

Revision ID: e580182d6bfd
Revises: f55525c81eb5
Create Date: 2025-09-16 17:41:10.254233

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = 'e580182d6bfd'
down_revision = 'f55525c81eb5'
branch_labels = None
depends_on = None


def upgrade() -> None:
op.add_column(
"bundles",
sa.Column("runnable_image_forwarder_type", sa.String(), nullable=True),
schema="hosted_model_inference",
)


def downgrade() -> None:
op.drop_column(
"bundles",
"runnable_image_forwarder_type",
schema="hosted_model_inference",
)
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class Bundle(Base):
runnable_image_protocol = Column(Text, nullable=True)
runnable_image_readiness_initial_delay_seconds = Column(Integer, nullable=True)
runnable_image_extra_routes = Column(ARRAY(Text), nullable=True)
runnable_image_forwarder_type = Column(Text, nullable=True)
runnable_image_worker_command = Column(ARRAY(Text), nullable=True)
runnable_image_worker_env = Column(JSON, nullable=True)

Expand Down Expand Up @@ -209,6 +210,7 @@ def __init__(
runnable_image_protocol: Optional[str] = None,
runnable_image_readiness_initial_delay_seconds: Optional[int] = None,
runnable_image_extra_routes: Optional[List[str]] = None,
runnable_image_forwarder_type: Optional[str] = None,
runnable_image_worker_command: Optional[List[str]] = None,
runnable_image_worker_env: Optional[Dict[str, Any]] = None,
# Streaming Enhanced Runnable Image fields
Expand Down Expand Up @@ -267,6 +269,7 @@ def __init__(
self.runnable_image_env = runnable_image_env
self.runnable_image_protocol = runnable_image_protocol
self.runnable_image_extra_routes = runnable_image_extra_routes
self.runnable_image_forwarder_type = runnable_image_forwarder_type
self.runnable_image_worker_command = runnable_image_worker_command
self.runnable_image_worker_env = runnable_image_worker_env
self.runnable_image_readiness_initial_delay_seconds = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class RunnableImageLike(BaseModel, ABC):
protocol: Literal["http"] # TODO: add support for other protocols (e.g. grpc)
readiness_initial_delay_seconds: int = 120
extra_routes: List[str] = Field(default_factory=list)
forwarder_type: Optional[ForwarderType] = ForwarderType.DEFAULT
forwarder_type: Optional[str] = ForwarderType.DEFAULT.value
worker_command: Optional[List[str]] = None
worker_env: Optional[Dict[str, str]] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def translate_model_bundle_orm_to_model_bundle(
protocol=model_bundle_orm.runnable_image_protocol,
readiness_initial_delay_seconds=model_bundle_orm.runnable_image_readiness_initial_delay_seconds,
extra_routes=model_bundle_orm.runnable_image_extra_routes,
forwarder_type=model_bundle_orm.runnable_image_forwarder_type,
worker_command=model_bundle_orm.runnable_image_worker_command,
worker_env=model_bundle_orm.runnable_image_worker_env,
streaming_command=model_bundle_orm.streaming_enhanced_runnable_image_streaming_command,
Expand Down Expand Up @@ -218,6 +219,7 @@ def translate_kwargs_to_model_bundle_orm(
"readiness_initial_delay_seconds"
),
runnable_image_extra_routes=flavor_dict.get("extra_routes"),
runnable_image_forwarder_type=flavor_dict.get("forwarder_type"),
runnable_image_worker_command=flavor_dict.get("worker_command"),
runnable_image_worker_env=flavor_dict.get("worker_env"),
streaming_enhanced_runnable_image_streaming_command=flavor_dict.get("streaming_command"),
Expand Down