Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b7fbfe3
feat: no parallelism so do some reverting of earthfile
hhzhang16 Apr 11, 2025
e5598d4
feat: copy files to sdk/cli/bin
hhzhang16 Apr 12, 2025
44bd0ac
feat: split cargo build and copying of files so that they can cache
hhzhang16 Apr 12, 2025
3a64d20
feat: fix earthfile!
hhzhang16 Apr 14, 2025
c3fe46b
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/earth…
hhzhang16 Apr 14, 2025
0d4c52b
Merge branch 'main' into hannahz/earthfile-improvements
hhzhang16 Apr 14, 2025
fb937ff
ci: use wheels instead of .
hhzhang16 Apr 14, 2025
42f4251
Merge branch 'hannahz/earthfile-improvements' of github.com:ai-dynamo…
hhzhang16 Apr 14, 2025
d12a06c
ci: earthfile improvements
hhzhang16 Apr 14, 2025
18eafed
ci: replace cp with symlinks
hhzhang16 Apr 15, 2025
42807cd
feat: remove README from Cargo.toml
hhzhang16 Apr 15, 2025
3f5b1ea
ci: cache build steps, slim down final image to 585MB
hhzhang16 Apr 15, 2025
95e913d
Merge branch 'main' into hannahz/earthfile-improvements
hhzhang16 Apr 15, 2025
babf871
ci: add cuda to dynamo base docker
hhzhang16 Apr 15, 2025
34d7162
ci: add Earthfile for vLLM (patched) and add dynamo-base-docker-llm E…
hhzhang16 Apr 16, 2025
6309c92
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/earth…
hhzhang16 Apr 16, 2025
530d886
ci: install cuda in dynamo base docker llm
hhzhang16 Apr 16, 2025
5b8eede
[wip] feat: add nixl
hhzhang16 Apr 16, 2025
0c0a46d
feat: move cuda setup to an Earthly function
hhzhang16 Apr 16, 2025
527dad7
ci: working container/Earthfile for NIXL
hhzhang16 Apr 16, 2025
36bff6e
feat: cut vLLM docker iamge down to 13GB
hhzhang16 Apr 17, 2025
5ef2587
Merge branch 'main' of github.com:ai-dynamo/dynamo into hannahz/earth…
hhzhang16 Apr 18, 2025
225d51c
feat: fix all-docker
hhzhang16 Apr 18, 2025
5b0e15f
feat: update docker server and image tag args
hhzhang16 Apr 21, 2025
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
Prev Previous commit
Next Next commit
ci: cache build steps, slim down final image to 585MB
  • Loading branch information
hhzhang16 committed Apr 15, 2025
commit 3f5b1ea983515e769f333c332fc32e7ed2d8ae6c
55 changes: 42 additions & 13 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,7 @@ rust-base:
rm rustup-init && \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME

dynamo-base-docker:
ARG IMAGE=dynamo-base-docker
ARG CI_REGISTRY_IMAGE=my-registry
ARG CI_COMMIT_SHA=latest
dynamo-build:
FROM +rust-base
WORKDIR /workspace
COPY Cargo.toml Cargo.lock ./
Expand All @@ -99,10 +96,10 @@ dynamo-base-docker:
COPY deploy/ deploy/

ENV CARGO_TARGET_DIR=/workspace/target

RUN cargo build --release --locked && \
cargo doc --no-deps

# Create symlinks for wheel building
RUN mkdir -p /workspace/deploy/dynamo/sdk/src/dynamo/sdk/cli/bin/ && \
# Remove existing symlinks
rm -f /workspace/deploy/dynamo/sdk/src/dynamo/sdk/cli/bin/* && \
Expand All @@ -111,18 +108,50 @@ dynamo-base-docker:
ln -sf /workspace/target/release/http /workspace/deploy/dynamo/sdk/src/dynamo/sdk/cli/bin/http && \
ln -sf /workspace/target/release/llmctl /workspace/deploy/dynamo/sdk/src/dynamo/sdk/cli/bin/llmctl

# Install ai-dynamo-runtime first
RUN cd /workspace/lib/bindings/python && \
uv build --wheel --out-dir /workspace/dist --python 3.12 && \
uv pip install /workspace/dist/ai_dynamo_runtime*cp312*.whl

# Build and install ai-dynamo
RUN cd /workspace/lib/bindings/python && \
uv build --wheel --out-dir /workspace/dist --python 3.12
RUN cd /workspace && \
uv build --wheel --out-dir /workspace/dist && \
uv pip install /workspace/dist/ai_dynamo*any.whl
SAVE IMAGE --push $CI_REGISTRY_IMAGE/$IMAGE:$CI_COMMIT_SHA
uv build --wheel --out-dir /workspace/dist

# Save wheels
SAVE ARTIFACT /workspace/dist/ai_dynamo_runtime*.whl
SAVE ARTIFACT /workspace/dist/ai_dynamo*.whl

dynamo-base-docker:
ARG IMAGE=dynamo-base-docker
ARG CI_REGISTRY_IMAGE=my-registry
ARG CI_COMMIT_SHA=latest

FROM ubuntu:24.04
WORKDIR /workspace

# Install Python and other dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3.12 \
curl && \
rm -rf /var/lib/apt/lists/*

COPY +uv-source/uv /bin/uv

# Create and activate virtual environment
RUN mkdir -p /opt/dynamo && \
uv venv /opt/dynamo/venv --python 3.12 && \
. /opt/dynamo/venv/bin/activate && \
uv pip install pip

ENV VIRTUAL_ENV=/opt/dynamo/venv
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"

# Copy and install wheels -- ai-dynamo-runtime first, then ai-dynamo
COPY +dynamo-build/ai_dynamo_runtime*.whl /tmp/wheels/
COPY +dynamo-build/ai_dynamo*.whl /tmp/wheels/
RUN . /opt/dynamo/venv/bin/activate && \
uv pip install /tmp/wheels/*.whl && \
rm -rf /tmp/wheels

SAVE IMAGE --push $CI_REGISTRY_IMAGE/$IMAGE:$CI_COMMIT_SHA

############### ALL TARGETS ##############################
all-test:
Expand Down
Loading