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

feat(docker): fix CUDA compile on devel image and improve run.sh #4849

Merged
merged 11 commits into from
Jun 14, 2024

Conversation

oguzkaganozt
Copy link
Contributor

@oguzkaganozt oguzkaganozt commented Jun 10, 2024

Description

This PR includes the first phase changes of this bulk PR

  • Revert this to download artifacts into container images to make them self-sufficient for direct running again
  • Add base image for modular containers
  • Fix of bug. Not removing CUDA and Tensorrt static libraries to enable building Autoware from scratch with CUDA libraries
  • Make run.sh more intuitive

Tests performed

https://github.com/autowarefoundation/autoware/actions/runs/9450305663

Effects on system behavior

Not applicable.

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@oguzkaganozt oguzkaganozt requested a review from mitsudome-r June 10, 2024 14:04
@oguzkaganozt oguzkaganozt self-assigned this Jun 10, 2024
@oguzkaganozt oguzkaganozt requested a review from youtalk as a code owner June 10, 2024 14:04
@oguzkaganozt
Copy link
Contributor Author

@youtalk @mitsudome-r This is the first phase of this PR

@oguzkaganozt oguzkaganozt force-pushed the modular-containers-phase1 branch from 72da2e2 to d382308 Compare June 10, 2024 14:11
Copy link
Member

@youtalk youtalk left a comment

Choose a reason for hiding this comment

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

It's even better than before! We can review it easier and faster.

Do you have an actual reason to re-add --download-artifacts at build time?
ref. #4771

@oguzkaganozt
Copy link
Contributor Author

It's even better than before! We can review it easier and faster.

Do you have an actual reason to re-add --download-artifacts at build time? ref. #4771

I think we should keep our images as complete as possible. Since we don't have any disk usage problem anymore, we can re-add those artifacts to simplify container usage. Because the original intention was to save space.

And also think about a scenario in which user just downloads the image and go on a field test where there is no sufficient internet connection to download all artifacts. IMHO, devel and runtime images should be self-sufficient. Moreover these artifacts are mandatory to run essential parts of the Autoware(perception, localization) that means user will always need to download them so why not just keep them inside the image ?

@oguzkaganozt oguzkaganozt requested a review from youtalk June 12, 2024 13:37
@oguzkaganozt
Copy link
Contributor Author

It's even better than before! We can review it easier and faster.
Do you have an actual reason to re-add --download-artifacts at build time? ref. #4771

I think we should keep our images as complete as possible. Since we don't have any disk usage problem anymore, we can re-add those artifacts to simplify container usage. Because the original intention was to save space.

And also think about a scenario in which user just downloads the image and go on a field test where there is no sufficient internet connection to download all artifacts. IMHO, devel and runtime images should be self-sufficient. Moreover these artifacts are mandatory to run essential parts of the Autoware(perception, localization) that means user will always need to download them so why not just keep them inside the image ?

It's even better than before! We can review it easier and faster.
Do you have an actual reason to re-add --download-artifacts at build time? ref. #4771

I think we should keep our images as complete as possible. Since we don't have any disk usage problem anymore, we can re-add those artifacts to simplify container usage. Because the original intention was to save space.

And also think about a scenario in which user just downloads the image and go on a field test where there is no sufficient internet connection to download all artifacts. IMHO, devel and runtime images should be self-sufficient. Moreover these artifacts are mandatory to run essential parts of the Autoware(perception, localization) that means user will always need to download them so why not just keep them inside the image ?

@youtalk ?

@youtalk
Copy link
Member

youtalk commented Jun 13, 2024

I'm sorry to reply late.
I understood. Then we need to first revert #4771. I made the PR #4864.
After merging #4864 and rebasing this PR, I will approve it.

@youtalk
Copy link
Member

youtalk commented Jun 13, 2024

@oguzkaganozt In addition, I think we also need to change the PR title. The current title alone does not describe what it is trying to achieve.

@oguzkaganozt oguzkaganozt changed the title feat(docker): first phase of the modular containers PR feat(docker): fix CUDA compile on devel image and improve run.sh Jun 13, 2024
docker/build.sh Outdated Show resolved Hide resolved
docker/build.sh Show resolved Hide resolved
Copy link
Member

@youtalk youtalk left a comment

Choose a reason for hiding this comment

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

LGTM
9665082 is strange though.

@oguzkaganozt oguzkaganozt force-pushed the modular-containers-phase1 branch from f4d0bd0 to 873fe8a Compare June 14, 2024 10:03
@oguzkaganozt oguzkaganozt requested a review from xmfcx as a code owner June 14, 2024 10:06
@oguzkaganozt oguzkaganozt force-pushed the modular-containers-phase1 branch from 3920e0a to cf8405e Compare June 14, 2024 11:39
docker/Dockerfile Show resolved Hide resolved
docker/Dockerfile Outdated Show resolved Hide resolved
ansible/playbooks/openadkit.yaml Show resolved Hide resolved
docker/build.sh Show resolved Hide resolved
@oguzkaganozt oguzkaganozt merged commit 4e7f539 into main Jun 14, 2024
12 of 13 checks passed
@oguzkaganozt oguzkaganozt deleted the modular-containers-phase1 branch June 14, 2024 12:35
# Main script execution
parse_arguments "$@"
set_cuda_options
set_build_options
set_platform
set_arch_lib_dir
load_env
clone_repositories
Copy link

Choose a reason for hiding this comment

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

@oguzkaganozt may I please check with you what is the purpose of this step?
In the Dockerfile we are still copying the src that is under autoware not the src that is under autoware/docker.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for your review. I think it is a mistake and I fix it by #4894.

@xmfcx
Copy link
Contributor

xmfcx commented Jun 16, 2024

docker-build-and-push-main CI started failing after this was merged:

ERROR: tag is needed when pushing to registry
Error: buildx bake failed with: ERROR: tag is needed when pushing to registry

https://github.com/autowarefoundation/autoware/actions/runs/9516216183/job/26232045461#step:8:1288

@oguzkaganozt

Probabable cause

It has passed the test on the initial PR description:

Then, some tag related things were changed within the PR review process:
#4849 (comment)

To prevent such cases from happening, perform the tests again before merging.


Referenced in the issue:

Let's track it there.

pravinkmr26 pushed a commit to pravinkmr26/autoware that referenced this pull request Jul 15, 2024
…owarefoundation#4849)

* modular containers PR phase1

Signed-off-by: Oguz <[email protected]>

* style(pre-commit): autofix

* add download artifacts to devel and runtime image

Signed-off-by: Oguz <[email protected]>

* Update docker/build.sh

Co-authored-by: Yutaka Kondo <[email protected]>

* style(pre-commit): autofix

* build from temp source directory and remove dangling images

Signed-off-by: Oguz Ozturk <[email protected]>

* Revert "build from temp source directory and remove dangling images"

This reverts commit c66a1dd.

* build containers from temp source and remove dangling images

Signed-off-by: Oguz Ozturk <[email protected]>

* style(pre-commit): autofix

* add vcs pull to update

Signed-off-by: Oguz Ozturk <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Oguz <[email protected]>
Signed-off-by: Oguz Ozturk <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yutaka Kondo <[email protected]>
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.

4 participants