Skip to content

Commit d0f23d9

Browse files
ansjindalpingsutw
authored andcommitted
Add Flytekit-Lepton Plugin for Lepton AI Inference Endpoints (#3328)
Signed-off-by: ansjindal <[email protected]> Co-authored-by: Kevin Su <[email protected]> Signed-off-by: Atharva <[email protected]>
1 parent 22bb58e commit d0f23d9

File tree

15 files changed

+2384
-0
lines changed

15 files changed

+2384
-0
lines changed

.github/workflows/pythonbuild.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ jobs:
301301
- flytekit-data-fsspec
302302
- flytekit-dbt
303303
- flytekit-deck-standard
304+
- flytekit-dgxc-lepton
304305
# TODO: remove dolt plugin - https://github.com/flyteorg/flyte/issues/5350
305306
# flytekit-dolt
306307
- flytekit-duckdb
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Ignore deployment files from Docker build
2+
deployment/
3+
examples/
4+
tests/
5+
*.md
6+
.git
7+
.gitignore
8+
__pycache__/
9+
*.pyc
10+
*.pyo
11+
*.egg-info/
12+
build/
13+
dist/
14+
.pytest_cache/
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Dockerfile for Lepton Agent
2+
# This creates a standalone agent service for handling Lepton endpoint operations
3+
4+
FROM ghcr.io/flyteorg/flytekit:py3.12-latest
5+
6+
# Switch to root to handle file permissions
7+
USER root
8+
9+
# Install git for leptonai installation
10+
RUN apt-get update && apt-get install -y git && apt-get clean && rm -rf /var/lib/apt/lists/*
11+
12+
# Copy and install our plugin
13+
COPY --chown=flytekit:flytekit . /home/flytekit/dgxc-lepton-plugin
14+
WORKDIR /home/flytekit/dgxc-lepton-plugin
15+
16+
# Clean any existing build artifacts
17+
RUN rm -rf *.egg-info build dist
18+
19+
# Install the plugin
20+
RUN pip install .
21+
22+
# Switch back to flytekit user
23+
USER flytekit
24+
25+
# Expose agent service port
26+
EXPOSE 8000
27+
28+
# Start the connector service
29+
# The connector service will handle Lepton endpoint lifecycle operations via gRPC
30+
CMD ["pyflyte", "serve", "connector", "--port", "8000", "--modules", "flytekitplugins.dgxc_lepton"]

0 commit comments

Comments
 (0)