Commit aacc5d76 authored by Biswa Panda's avatar Biswa Panda Committed by GitHub
Browse files

feat: onboard dynamo-sdk basic and kv-router examples (#20)


Co-authored-by: default avatarNeelay Shah <neelays@nvidia.com>
parent 2ee29443
......@@ -26,17 +26,17 @@ golang-base:
############### ALL TARGETS ##############################
all-test:
BUILD ./deploy/compoundai/operator+test
# BUILD ./deploy/compoundai/api-server+test #TODO: mkhadkevich earthly tests fail https://gitlab-master.nvidia.com/aire/microservices/compoundai/-/jobs/144475821
BUILD ./deploy/dynemo/operator+test
# BUILD ./deploy/dynemo/api-server+test #TODO: mkhadkevich earthly tests fail https://gitlab-master.nvidia.com/aire/microservices/compoundai/-/jobs/144475821
all-docker:
ARG CI_REGISTRY_IMAGE=my-registry
ARG CI_COMMIT_SHA=latest
BUILD ./deploy/compoundai/operator+docker --CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE --CI_COMMIT_SHA=$CI_COMMIT_SHA
BUILD ./deploy/compoundai/api-server+docker --CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE --CI_COMMIT_SHA=$CI_COMMIT_SHA
BUILD ./deploy/dynemo/operator+docker --CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE --CI_COMMIT_SHA=$CI_COMMIT_SHA
BUILD ./deploy/dynemo/api-server+docker --CI_REGISTRY_IMAGE=$CI_REGISTRY_IMAGE --CI_COMMIT_SHA=$CI_COMMIT_SHA
all-lint:
BUILD ./deploy/compoundai/operator+lint
BUILD ./deploy/dynemo/operator+lint
all:
BUILD +all-test
......
......@@ -154,6 +154,9 @@ RUN cd examples/rust && \
cp target/release/http /usr/local/bin/ && \
cp target/release/llmctl /usr/local/bin/
COPY deploy/dynemo/sdk /workspace/deploy/dynemo/sdk
# Generate C bindings. Note that this is required for TRTLLM backend re-build
COPY lib/bindings /workspace/lib/bindings
RUN cd lib/bindings/c/ && \
......@@ -165,7 +168,10 @@ RUN mkdir /opt/dynemo && \
uv venv /opt/dynemo/venv --python 3.12 && \
source /opt/dynemo/venv/bin/activate && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/dynemo*cp312*.whl
uv pip install /workspace/dist/dynemo*cp312*.whl && \
cd /workspace/deploy/dynemo/sdk && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/dynemo_sdk*any.whl
# Package the bindings
RUN mkdir -p /opt/dynemo/bindings/wheels && \
......@@ -177,7 +183,9 @@ RUN mkdir -p /opt/dynemo/bindings/wheels && \
# Install dynemo.runtime and dynemo.llm wheels globally in container for tests that
# currently run without virtual environment activated.
# TODO: In future, we may use a virtualenv for everything and remove this.
RUN pip install /opt/dynemo/bindings/wheels/dynemo*cp312*.whl
RUN cd /opt/dynemo/bindings/wheels && \
pip install dynemo*cp312*.whl && \
pip install /workspace/dist/dynemo_sdk*any.whl
# Copy everything in after ginstall steps to avoid re-running build/install
# commands on unrelated changes in other dirs.
......
......@@ -100,10 +100,14 @@ COPY lib/bindings /workspace/lib/bindings
RUN cd lib/bindings/c && \
cargo build --release --locked && cargo doc --no-deps
COPY deploy/dynemo/sdk /workspace/deploy/dynemo/sdk
# Build dynemo wheel
RUN source /opt/dynemo/venv/bin/activate && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/dynemo*cp312*.whl
uv pip install /workspace/dist/dynemo*cp312*.whl && \
cd /workspace/deploy/dynemo/sdk && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/dynemo_sdk*any.whl
# Package the bindings
RUN mkdir -p /opt/dynemo/bindings/wheels && \
......
......@@ -230,10 +230,14 @@ COPY lib/bindings /workspace/lib/bindings
RUN cd lib/bindings/c && \
cargo build --release --locked && cargo doc --no-deps
COPY deploy/dynemo/sdk /workspace/deploy/dynemo/sdk
# Build dynemo wheel
RUN source /opt/dynemo/venv/bin/activate && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/dynemo*cp312*.whl
uv pip install /workspace/dist/dynemo*cp312*.whl && \
cd /workspace/deploy/dynemo/sdk && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/dynemo_sdk*any.whl
# Package the bindings
RUN mkdir -p /opt/dynemo/bindings/wheels && \
......@@ -248,6 +252,7 @@ ENV VLLM_KV_CAPI_PATH="/opt/dynemo/bindings/lib/libdynemo_llm_capi.so"
# FIXME: Copy more specific folders in for dev/debug after directory restructure
COPY . /workspace
# FIXME: May want a modification with dynemo-distributed banner on entry
ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
......
......@@ -21,3 +21,5 @@ pytest-cov
pytest-md-report
pytest-mypy
pytest-timeout
# add types library stub for PyYAML
types-PyYAML
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment