Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Future-Outlier <[email protected]>
  • Loading branch information
Future-Outlier committed Feb 27, 2025
1 parent 6dd067e commit e00bab3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 1 addition & 3 deletions Dockerfile.agent
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ ARG VERSION
RUN apt-get update && apt-get install build-essential -y \
&& pip install uv

RUN uv pip install --system --no-cache-dir -U flytekit==$VERSION \
RUN uv pip install --system --no-cache-dir -U flytekit[agent]==$VERSION \
flytekitplugins-airflow==$VERSION \
flytekitplugins-bigquery==$VERSION \
flytekitplugins-k8sdataservice==$VERSION \
flytekitplugins-openai==$VERSION \
flytekitplugins-snowflake==$VERSION \
flytekitplugins-awssagemaker==$VERSION \
prometheus-client \
grpcio-health-checking \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
Expand Down
11 changes: 3 additions & 8 deletions flytekit/clis/sdk_in_container/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ def agent(_: click.Context, port, prometheus_port, worker, timeout, modules):
"""
import asyncio

# try:
# from flytekit.extras.webhook import WebhookAgent # noqa: F401 Webhook Agent Registration
# except ImportError:
# from flytekit import logger

# logger.debug("Flyte Agent Dependency is not installed. Please install it using `pip install flytekit[agent]`")

working_dir = os.getcwd()
if all(os.path.realpath(path) != working_dir for path in sys.path):
sys.path.append(working_dir)
Expand All @@ -89,7 +82,9 @@ async def _start_grpc_server(port: int, prometheus_port: int, worker: int, timeo
from flytekit.extend.backend.agent_service import AgentMetadataService, AsyncAgentService, SyncAgentService
from flytekit.extras.webhook import WebhookAgent # noqa: F401 Webhook Agent Registration
except ImportError as e:
raise ImportError("Flyte agent dependencies are not installed. Please install it using `pip install flytekit[agent]`") from e
raise ImportError(
"Flyte agent dependencies are not installed. Please install it using `pip install flytekit[agent]`"
) from e

click.secho("🚀 Starting the agent service...")
_start_http_server(prometheus_port)
Expand Down

0 comments on commit e00bab3

Please sign in to comment.