Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
f64e2366
Commit
f64e2366
authored
Mar 15, 2025
by
Harrison Saturley-Hall
Committed by
GitHub
Mar 15, 2025
Browse files
feat: Support a small runtime container (#167)
parent
58e7461a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
.github/workflows/pre-merge-python.yml
.github/workflows/pre-merge-python.yml
+1
-1
container/Dockerfile.vllm
container/Dockerfile.vllm
+31
-1
container/build.sh
container/build.sh
+3
-1
No files found.
.github/workflows/pre-merge-python.yml
View file @
f64e2366
...
@@ -69,7 +69,7 @@ jobs:
...
@@ -69,7 +69,7 @@ jobs:
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.CI_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.CI_TOKEN }}
run
:
|
run
:
|
./container/build.sh --tag ${{ steps.define_image_tag.outputs.image_tag }} --framework ${{ matrix.framework }} ${{ steps.which_caches.outputs.cache_from_location }} ${{ steps.which_caches.outputs.cache_to_location }}
./container/build.sh --tag ${{ steps.define_image_tag.outputs.image_tag }}
--target dev
--framework ${{ matrix.framework }} ${{ steps.which_caches.outputs.cache_from_location }} ${{ steps.which_caches.outputs.cache_to_location }}
-
name
:
Run pytest
-
name
:
Run pytest
env
:
env
:
PYTEST_MARKS
:
"
pre_merge
or
mypy"
PYTEST_MARKS
:
"
pre_merge
or
mypy"
...
...
container/Dockerfile.vllm
View file @
f64e2366
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
ARG BASE_IMAGE="nvcr.io/nvidia/cuda-dl-base"
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
ARG BASE_IMAGE_TAG="25.01-cuda12.8-devel-ubuntu24.04"
ARG RUNTIME_IMAGE="nvcr.io/nvidia/cuda"
ARG RUNTIME_IMAGE_TAG="12.8.1-runtime-ubuntu24.04"
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} AS nixl_base
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} AS nixl_base
WORKDIR /opt/nixl
WORKDIR /opt/nixl
# Add a cache hint that only changes when the nixl commit changes
# Add a cache hint that only changes when the nixl commit changes
...
@@ -269,5 +272,32 @@ ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
...
@@ -269,5 +272,32 @@ ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
CMD []
CMD []
### TODO Lean Runtime Image Stage ###
########################################
########## RUNTIME CONTAINER ###########
########################################
FROM ${RUNTIME_IMAGE}:${RUNTIME_IMAGE_TAG} AS runtime
WORKDIR /workspace
ENV VIRTUAL_ENV=/opt/dynamo/venv
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Setup the python environment
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN uv venv $VIRTUAL_ENV --python 3.12 && \
ln -s $(find / -name libpython3.12.so*) /usr/lib && \
echo "source $VIRTUAL_ENV/bin/activate" >> ~/.bashrc
# Install the wheels
COPY --from=dev /workspace/dist/*.whl whls/
RUN uv pip install $(find whls -name ai_dynamo_runtime-*.whl) && \
uv pip install $(find whls -name ai_dynamo-*.whl) && \
uv pip install $(find whls -name vllm*cp312*.whl) && \
rm -r whls
# Tell vllm to use the Dynamo LLM C API for KV Cache Routing
ENV VLLM_KV_CAPI_PATH="/opt/dynamo/bindings/lib/libdynamo_llm_capi.so"
# dynamo run in=text out=mistralrs Qwen/Qwen2.5-3B-Instruct
CMD []
\ No newline at end of file
container/build.sh
View file @
f64e2366
...
@@ -229,6 +229,8 @@ get_options() {
...
@@ -229,6 +229,8 @@ get_options() {
if
[
!
-z
"
$TARGET
"
]
;
then
if
[
!
-z
"
$TARGET
"
]
;
then
TARGET_STR
=
"--target
${
TARGET
}
"
TARGET_STR
=
"--target
${
TARGET
}
"
else
TARGET_STR
=
"--target runtime"
fi
fi
}
}
...
@@ -355,4 +357,4 @@ if [ -z "$RUN_PREFIX" ]; then
...
@@ -355,4 +357,4 @@ if [ -z "$RUN_PREFIX" ]; then
set
-x
set
-x
fi
fi
{
set
+x
;
}
2>/dev/null
{
set
+x
;
}
2>/dev/null
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment