-
Notifications
You must be signed in to change notification settings - Fork 12
fix(dockerutil): GetImageMetadata: detect correct usr lib dir based on os release #127
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
15bdb9a
fix(dockerutil): GetImageMetadata: sniff container UsrLibDir
johnstcn 92ea729
chore(integration): add basic integration test for Nvidia GPUs
johnstcn 558a836
choose innner UsrLibDir based on /etc/os-release
johnstcn 2bde28c
fall back to linux if no /etc/os-release found
johnstcn 66a2ffd
use env instead of build directive to skip integration tests
johnstcn d91e243
automatically detect CODER_USR_LIB_DIR
johnstcn c9fc5c0
bump upload-artifact action
johnstcn d4a0919
linter fix
johnstcn 0dceab2
revert guessing host usr lib dir
johnstcn 646ca60
avoid duplicate mounts
johnstcn 782e917
update gpu section in README
johnstcn 55c15f9
fixup! avoid duplicate mounts
johnstcn 5d58aeb
add CODER_INNER_USR_LIB_DIR override
johnstcn d771a8c
fix typo
johnstcn cc60ef2
log error in reading os-release
johnstcn 5524d68
explicitly define usrLibMultiarchDir on supported platforms via build…
johnstcn 4ad80a4
fix comment
johnstcn 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,5 @@ | ||
package dockerutil | ||
|
||
// usrLibMultiarchDir is defined for arm64 and amd64 architectures. | ||
// Envbox is not published for other architectures. | ||
var usrLibMultiarchDir = "/usr/lib/aarch64-linux-gnu" |
This file contains hidden or 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,5 @@ | ||
package dockerutil | ||
|
||
// usrLibMultiarchDir is defined for arm64 and amd64 architectures. | ||
// Envbox is not published for other architectures. | ||
var usrLibMultiarchDir = "/usr/lib/x86_64-linux-gnu" |
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
//go:build integration | ||
// +build integration | ||
|
||
package integration_test | ||
|
||
import ( | ||
|
@@ -24,6 +21,9 @@ import ( | |
|
||
func TestDocker(t *testing.T) { | ||
t.Parallel() | ||
if val, ok := os.LookupEnv("CODER_TEST_INTEGRATION"); !ok || val != "1" { | ||
t.Skip("integration tests are skipped unless CODER_TEST_INTEGRATION=1") | ||
} | ||
|
||
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. review: moved to this method of skipping the tests, as the build directives were annoying |
||
// Dockerd just tests that dockerd can spin up and function correctly. | ||
t.Run("Dockerd", func(t *testing.T) { | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
review: required for CI to pass