Skip to content
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

fix(dockerutil): GetImageMetadata: detect correct usr lib dir based on os release #127

Merged
merged 17 commits into from
Mar 6, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Mar 4, 2025

Updates #126

We had been mounting GPU libraries into the destination /usr/lib inside the inner container by default. This doesn't hold true for Redhat-based distributions, who use /usr/lib64 instead.

  • Adds the capability to sniff /etc/os-release inside the inner container
  • Modifies the destination path for bind-mounting GPU libraries to the inner container based on the detected OS release ID
  • Adds integration testing for Envbox+NVidia GPUs (not run by default in CI)
  • Attempts to automatically set CODER_USR_LIB_DIR if not specified.
  • Adds the capability to manually set the inner mount path via CODER_INNER_USR_LIB_DIR.

@johnstcn johnstcn self-assigned this Mar 4, 2025
Comment on lines +24 to +26
if val, ok := os.LookupEnv("CODER_TEST_INTEGRATION"); !ok || val != "1" {
t.Skip("integration tests are skipped unless CODER_TEST_INTEGRATION=1")
}
Copy link
Member Author

Choose a reason for hiding this comment

The 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

@johnstcn johnstcn marked this pull request as ready for review March 5, 2025 13:55
@johnstcn johnstcn changed the title fix(dockerutil): GetImageMetadata: sniff container UsrLibDir fix(dockerutil): GetImageMetadata: detect correct usr lib dir based on os release Mar 5, 2025
Copy link
Member

@deansheather deansheather left a comment

Choose a reason for hiding this comment

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

Looks good other than my concern about host /usr/lib dir being autodetected

@johnstcn johnstcn force-pushed the cj/dockerutil-usrlibdir branch from 8b92093 to 5d58aeb Compare March 6, 2025 11:00
@johnstcn
Copy link
Member Author

johnstcn commented Mar 6, 2025

Rebased on main with the correct author and GPG signature.

@@ -209,7 +209,7 @@ jobs:
category: "Trivy"

- name: Upload Trivy scan results as an artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
Copy link
Member Author

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

@johnstcn johnstcn merged commit a556bac into main Mar 6, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants