-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Docker and Dev Container setup using Buildkit #4392
Draft
ruffsl
wants to merge
66
commits into
main
Choose a base branch
from
buildkit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,940
−309
Draft
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
063ab99
Comment out old CI for migration
ruffsl a4dff33
Simplify dockerignore by inverting matching set
ruffsl b070400
Refactor Dockerfile using Buildkit and bake files
ruffsl 7a09d15
Change COLCON_HOME in Dockerfile for now
ruffsl cdbe165
Refactor Dev Container using Buildkit and bake files
ruffsl acec643
Refactor Action Workflows using Buildkit and bake files
ruffsl b0dd131
Comment out CI trigger while WIP
ruffsl 35d28c7
Rollback RunsOn cache action to use GitHub's cache
ruffsl e78549e
Roll back RunsOn runner tags
ruffsl e9c2769
Roll back AWS ECR changes to use GHCR
ruffsl 44c45d4
Update retention to use sanitized tag names
ruffsl f27f3a2
Add debugger and releaser bake targets
ruffsl 37887b9
Clean ECR comments
ruffsl dc16919
Remove debugging command for test workflow
ruffsl b4ff763
Move docker stuff into .docker path
ruffsl 2b0bae0
Update docker paths
ruffsl 667a8ff
Mount user home as volume
ruffsl 18bf8a4
vcs import from underlay.repos file
ruffsl ba682a1
Simplify given cache should only be saved
ruffsl a6497ad
Use separate cache step to save via if always
ruffsl c1a9aab
Update docker bake action from v4 to v5
ruffsl 76110c0
Fix FromAsCasing warnings
ruffsl 88e34e1
Merge remote-tracking branch 'origin/main' into buildkit
ruffsl a2652cd
Set ccache key via septate step
ruffsl cee6ac0
Pass ccache_cache_key between jobs
ruffsl 3df9fb0
Restore ccache for build prod image jobs
ruffsl 248b33c
Update path to Dockerfile
ruffsl 5736762
Uncomment main caller workflow
ruffsl df9842a
Trigger on any change to the .docker path
ruffsl eb26b41
Change workflow action to current branch to test CI
ruffsl 894126c
Fix typo to use GITHUB_TOKEN
ruffsl aef79ad
Omit OCI configuration used for AWS ECR
ruffsl 5d8c00f
Image images using org + repo name
ruffsl ae8a274
Use gha for buildkit cache backend instead of S3
ruffsl de79d04
Bake underlay source into base image
ruffsl 45f00f2
Revert "Bake underlay source into base image"
ruffsl 140d1b3
Add nav2_minimal_turtlebot_simulation as submodules
ruffsl 27e8ceb
Remove clone step using vcstool
ruffsl 54f57aa
Fix OVERLAY_WS ENV to match Dockerfile
ruffsl c09f746
Try building prod image regardless of test results
ruffsl 5121a30
Enable docker-outside-docker
ruffsl 2c8bcc3
Reorder mounts
ruffsl 65c0194
Enable gh CLI
ruffsl f22b3cb
Add svg extension to view Dockerfile graphs
ruffsl 50b8f7c
Rename nav2 ws volume to be more descriptive
ruffsl bab8da7
Postfix home by use
ruffsl 7af09f7
Add bind volume to user home
ruffsl 922b91d
Comment out home bind mount by default
ruffsl ea6f72d
Add mark comments for readability
ruffsl 93d7a92
Sort ENVs
ruffsl 0de7df3
Explicitly set SSH_AUTH_SOCK for devcontainer CLI
ruffsl 94faf5b
Alway return 1
ruffsl 00fdbc8
Formatting
ruffsl 39ca865
Install GUI tools into dever stage
ruffsl 6126f1f
Use always() in if condition
ruffsl 75b849b
Add shim to build dever stage from debugger image
ruffsl 090be7f
Fix src folder to use full repo name
ruffsl fd84091
Remove --symlink-install from default script
ruffsl 23fe6ec
Simplify by removing unnecessary unset
ruffsl 17b9464
Correct comment
ruffsl 3fd241a
Add default gitconfig to recurse over submodules
ruffsl e3501fe
Add readme with quick start guide
ruffsl 1081d47
Add alias to source underlay workspace
ruffsl c695baa
Extend docs on build locally or pulling remotely
ruffsl 0314c34
Fix typo
ruffsl 73e8ed8
Update .devcontainer/README.md
ruffsl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Refactor Dev Container using Buildkit and bake files
commit cdbe1654c5cb67553d583d09aadab20b121d643a
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Immediately catch all errors | ||
set -eo pipefail | ||
|
||
# Uncomment for debugging | ||
# set -x | ||
# env | ||
|
||
# Use first argument as target name | ||
target=$1 | ||
|
||
# Bake the target and export locally to static tag | ||
docker buildx bake --load \ | ||
--file docker-bake.hcl \ | ||
--set $target.tags=nav2:devcontainer \ | ||
$target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if no NV GPU exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the user should comment out this device option and use the appropriate command for their local hardware, like
--device=/dev/dri
for Intel integrated graphics. Nvidia is just enabled by default as it's so common in robotics and AI development on linux (my own bias). We could leave all hardware acceleration options commented out by default instead, just a minor inconveniences to me.