Skip to content

Conversation

@julienmancuso
Copy link
Contributor

@julienmancuso julienmancuso commented Jul 28, 2025

Overview:

replace Earthly

Summary by CodeRabbit

  • New Features

    • Introduced comprehensive Makefile for streamlined build, test, lint, format, Docker image management, and development setup across Rust, Python, and Go components.
    • Added new multi-stage Dockerfiles for building and packaging both main and operator components with enhanced support for Python, Rust, CUDA, and Go.
  • Documentation

    • Updated deployment and quickstart guides to replace Earthly with Make-based build instructions.
    • Added deprecation notices to Earthfile scripts, directing users to the new Make-based system.
    • Revised Helm deployment README to reflect new Makefile usage for Docker image building and pushing.
  • Chores

    • Deprecated Earthfile-based build system in favor of Makefile-driven workflows, with migration guidance provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Walkthrough

A new multi-stage Dockerfile and Makefile are introduced, establishing a comprehensive build system for a project with Python, Rust, and Go components. Existing Earthfiles are deprecated in favor of Make-based workflows. Documentation and deployment guides are updated to reflect the migration from Earthly to Make for building and pushing Docker images.

Changes

Cohort / File(s) Change Summary
Docker Build System Introduction
Dockerfile, Makefile
Added a multi-stage Dockerfile supporting Python, Rust, and CUDA builds. Introduced a Makefile with targets for building, testing, linting, formatting, Docker image management, and development setup, replacing Earthly-based workflows.
Earthfile Deprecation
Earthfile, deploy/cloud/operator/Earthfile
Added deprecation notices to both Earthfiles, directing users to new Make-based commands and referencing a migration guide. No functional changes to Earthfile logic.
Operator Docker Build
deploy/cloud/operator/Dockerfile
Introduced a new multi-stage Dockerfile for building and running the Go-based operator binary, using a distroless runtime and non-root execution.
Operator Build Documentation Updates
deploy/cloud/helm/README.md, docs/guides/dynamo_deploy/quickstart.md
Updated documentation to replace Earthly-based operator Docker image build/push instructions with Make-based commands, using environment variables and simplified workflows.
Deployment Prerequisites Update
docs/guides/dynamo_deploy/dynamo_cloud.md
Changed deployment prerequisites to require Make and standard build tools instead of Earthly.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Makefile
    participant Docker
    participant Rust
    participant Python
    participant Go
    participant DockerHub

    Developer->>Makefile: make build
    Makefile->>Rust: Build Rust components
    Makefile->>Python: Build Python wheels
    Makefile->>Go: Build operator binary
    Makefile->>Docker: Build Docker images
    Makefile->>DockerHub: (optional) Push images
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇
A Dockerfile fresh, a Makefile anew,
Earthly retires, as old things must do.
Docs now proclaim, “Just make, don’t despair!”
Rust, Python, and Go—build magic’s in the air.
With containers that gleam and commands that are neat,
This bunny hops forward, with builds oh-so-sweet!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (8)
deploy/cloud/operator/Dockerfile (1)

5-7: Shrink builder image by avoiding recommended packages

Using plain apt-get install -y git pulls many recommended packages that are not required for a build container and increases image size. Add the --no-install-recommends flag for a slimmer layer.

-RUN apt-get update && apt-get install -y git && \
+RUN apt-get update && apt-get install -y --no-install-recommends git && \
     apt-get clean && rm -rf /var/lib/apt/lists/*
Dockerfile (1)

55-60: Hard-coded Rustup binary & checksum will age quickly

You embed a SHA256 for rustup-init 1.28.1. When a new rustup release is required the digest will break the build. To keep the build stable yet maintainable:

  1. Accept the hash via --build-arg RUSTUP_SHA256, defaulting to the current value.
  2. Document how to update it.

Optional, but avoids future breakage each time rustup updates.

deploy/cloud/helm/README.md (1)

46-47: Use explicit Makefile variables for reproducibility

Instead of relying on exported env vars from the shell session, you can invoke make with variable overrides:

make docker-build-operator docker-push-operator \
     DOCKER_SERVER="$DOCKER_SERVER" IMAGE_TAG="$IMAGE_TAG"

This makes the one-liner copy/pasteable and avoids polluting the user’s environment.

docs/guides/dynamo_deploy/quickstart.md (1)

100-107: Avoid duplicated environment-variable setup & make invocation clearer

DOCKER_SERVER / IMAGE_TAG are already exported in the earlier “Set Environment Variables” block (lines 73-77). Re-exporting them here can confuse readers and risks divergence if they change one place but not the other.
Consider either deleting lines 103-105 or replacing them with a reminder such as “(reuse the variables set above)” and add a short note that make docker-build-operator docker-push-operator must be executed from the repository root where the Makefile lives.

Earthfile (1)

16-26: Strip trailing whitespace in the new deprecation header

CI flagged trailing spaces on this block (see pipeline error). A quick fix:

-# - Use `container/build.sh` for framework containers  
+# - Use `container/build.sh` for framework containers

Run pre-commit run --all-files locally to catch these automatically.

Makefile (3)

28-39: install-deps uses separate shells – PATH update may be lost

Each recipe line runs in its own shell, so the source $$HOME/.cargo/env inside the if block does not persist to later lines (or other targets). If the user didn’t have cargo on their PATH beforehand, subsequent targets will fail.

Combine the commands into one shell or export PATH explicitly, e.g.:

-	@if ! command -v rustup >/dev/null 2>&1; then \
-		curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
-		source $$HOME/.cargo/env; \
-	fi
+	@if ! command -v rustup >/dev/null 2>&1; then \
+		curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
+		echo 'export PATH=$$HOME/.cargo/bin:$$PATH' >> ~/.profile; \
+	fi

146-151: Add conventional all target to silence checkmake warning

Static-analysis complains that a phony all target is missing. Adding a thin wrapper keeps linters quiet and gives users an obvious entry point:

+.PHONY: all
+all: build ## Build everything (alias for 'make build')

170-177: Trailing whitespace at lines 172/177 breaks pre-commit

-	earthly +all-docker $(EARTHLY_ARGS) 
+	earthly +all-docker $(EARTHLY_ARGS)

This will clear the “trailing-whitespace” hook failure.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cfc6178 and 51f9bc1.

📒 Files selected for processing (8)
  • Dockerfile (1 hunks)
  • Earthfile (1 hunks)
  • Makefile (1 hunks)
  • deploy/cloud/helm/README.md (1 hunks)
  • deploy/cloud/operator/Dockerfile (1 hunks)
  • deploy/cloud/operator/Earthfile (1 hunks)
  • docs/guides/dynamo_deploy/dynamo_cloud.md (1 hunks)
  • docs/guides/dynamo_deploy/quickstart.md (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: julienmancuso
PR: ai-dynamo/dynamo#1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1308-1312
Timestamp: 2025-06-11T21:29:28.650Z
Learning: User julienmancuso expects replies in English; avoid switching languages unless explicitly requested.
docs/guides/dynamo_deploy/dynamo_cloud.md (1)

Learnt from: julienmancuso
PR: #1474
File: deploy/cloud/operator/internal/controller/dynamocomponent_controller.go:1302-1306
Timestamp: 2025-06-11T21:18:00.425Z
Learning: In the Dynamo operator, the project’s preferred security posture is to set a Pod-level PodSecurityContext with runAsUser, runAsGroup, and fsGroup all set to 1000, and then selectively override the user at the individual container level (e.g., RunAsUser: 0 for Kaniko) when root is required.

deploy/cloud/operator/Earthfile (1)

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:92-98
Timestamp: 2025-07-18T16:04:31.771Z
Learning: CRD schemas in files like deploy/cloud/helm/crds/templates/*.yaml are auto-generated from Kubernetes library upgrades and should not be manually modified as changes would be overwritten during regeneration.

docs/guides/dynamo_deploy/quickstart.md (2)

Learnt from: julienmancuso
PR: #1337
File: deploy/cloud/helm/platform/components/operator/templates/image-builer-serviceaccount.yaml:0-0
Timestamp: 2025-06-03T15:26:55.732Z
Learning: The image-builder ServiceAccount in deploy/cloud/helm/platform/components/operator/templates/image-builer-serviceaccount.yaml does not need imagePullSecrets, unlike the component ServiceAccount.

Learnt from: julienmancuso
PR: #1365
File: deploy/cloud/operator/api/v1alpha1/dynamocomponentdeployment_types.go:171-178
Timestamp: 2025-06-04T13:09:53.416Z
Learning: The DYN_DEPLOYMENT_CONFIG environment variable (commonconsts.DynamoDeploymentConfigEnvVar) in the Dynamo operator will never be set via ValueFrom (secrets/config maps), only via direct Value assignment. The GetDynamoDeploymentConfig method correctly only checks env.Value for this specific environment variable.

deploy/cloud/helm/README.md (2)

Learnt from: julienmancuso
PR: #1337
File: deploy/cloud/helm/platform/components/operator/templates/image-builer-serviceaccount.yaml:0-0
Timestamp: 2025-06-03T15:26:55.732Z
Learning: The image-builder ServiceAccount in deploy/cloud/helm/platform/components/operator/templates/image-builer-serviceaccount.yaml does not need imagePullSecrets, unlike the component ServiceAccount.

Learnt from: julienmancuso
PR: #2012
File: deploy/cloud/helm/crds/templates/nvidia.com_dynamocomponentdeployments.yaml:92-98
Timestamp: 2025-07-18T16:04:31.771Z
Learning: CRD schemas in files like deploy/cloud/helm/crds/templates/*.yaml are auto-generated from Kubernetes library upgrades and should not be manually modified as changes would be overwritten during regeneration.

🪛 GitHub Actions: Pre Merge Validation of (ai-dynamo/dynamo/refs/pull/2154/merge) by julienmancuso.
deploy/cloud/operator/Earthfile

[error] 18-18: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.

Earthfile

[error] 18-18: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.

deploy/cloud/operator/Dockerfile

[error] 23-23: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.


[error] 89-89: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.

Dockerfile

[error] 23-23: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.


[error] 89-89: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.

Makefile

[error] 174-174: Trailing whitespace detected and fixed by pre-commit hook 'trailing-whitespace'. Run 'pre-commit run --all-files' locally to reproduce.

🪛 markdownlint-cli2 (0.17.2)
deploy/cloud/helm/README.md

45-45: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


45-45: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)

🪛 checkmake (0.2.2)
Makefile

[warning] 174-174: Missing required phony target "all"

(minphony)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Mirror Repository to GitLab
  • GitHub Check: Build and Test - vllm
🔇 Additional comments (1)
docs/guides/dynamo_deploy/dynamo_cloud.md (1)

35-35: 👍 Good replacement of Earthly with Make

The prerequisite list now correctly reflects the new build workflow. No issues found.

Copy link
Contributor

@dmitry-tokarev-nv dmitry-tokarev-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Few non-blocking nit-picking comments/questions.

Copy link
Contributor

@biswapanda biswapanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved to unblock CI urgently

  • let's move the top level Dockerfile into container/..

@biswapanda
Copy link
Contributor

Also let's ensure the operator spins up in CI with new docker image

@github-actions
Copy link

github-actions bot commented Sep 6, 2025

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 6, 2025
Signed-off-by: Julien Mancuso <[email protected]>
Signed-off-by: Julien Mancuso <[email protected]>
Signed-off-by: Julien Mancuso <[email protected]>
Signed-off-by: Julien Mancuso <[email protected]>
@julienmancuso julienmancuso dismissed nv-tusharma’s stale review September 22, 2025 22:16

MR has been updated since your initial review.

@julienmancuso julienmancuso merged commit 51b4cd7 into main Sep 22, 2025
16 of 18 checks passed
@julienmancuso julienmancuso deleted the jsm/dep-20 branch September 22, 2025 22:19
jasonqinzhou pushed a commit that referenced this pull request Sep 24, 2025
Signed-off-by: Julien Mancuso <[email protected]>
Signed-off-by: Jason Zhou <[email protected]>
jasonqinzhou pushed a commit that referenced this pull request Sep 24, 2025
Signed-off-by: Julien Mancuso <[email protected]>
Signed-off-by: Jason Zhou <[email protected]>
kylehh pushed a commit that referenced this pull request Sep 25, 2025
Signed-off-by: Julien Mancuso <[email protected]>
Signed-off-by: Kyle H <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants