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(colcon-build): source /opt/autoware/setup.sh if exists #337

Merged
merged 8 commits into from
Mar 7, 2025

Conversation

youtalk
Copy link
Member

@youtalk youtalk commented Mar 6, 2025

Description

In the current autoware images, the build artifacts of Autoware are saved under /opt/autoware.

https://github.com/autowarefoundation/autoware/blob/main/docker/Dockerfile#L158
https://github.com/autowarefoundation/autoware/blob/main/docker/scripts/build_and_clean.sh#L15

Therefore, in order to reference these artifacts, it is necessary to source /opt/autoware/setup.sh.
This PR makes that change. By doing so, it is expected to reduce unnecessary repository references in build_depends.repos and shorten the build time.

Tests performed

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.

youtalk added 4 commits March 6, 2025 16:08
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
@youtalk youtalk requested review from h-ohta, xmfcx and mitsudome-r March 6, 2025 08:30
@youtalk youtalk self-assigned this Mar 6, 2025
@youtalk youtalk requested a review from sasakisasaki March 6, 2025 08:31
@youtalk youtalk changed the title feat(colcon-build): source /opt/autoware/setup.bash if exists feat(colcon-build): source /opt/autoware/setup.sh if exists Mar 6, 2025
@xmfcx
Copy link
Contributor

xmfcx commented Mar 6, 2025

@youtalk -san, what do you think of removing the /opt/autoware completely from the development images?

It's understandable to have them for the runtime images.
But for the dev&ci images, the established way of working with the Autoware is to mount it and keep building from there. This makes sure the build/install folders stay persistent.

At least, for the CI we don't use this folder at all and it introduces about 700MB additional space.

@youtalk
Copy link
Member Author

youtalk commented Mar 6, 2025

I was not aware until now that the /opt/autoware was not being used at all in the CI for autoware.core/universe. That’s why I created this PR.

Also, if we decide to keep the build directory, the size of the development container will increase, leading to more disk space issues. The size of the install directory remains the same whether it is stored locally or in /opt/autoware.

@xmfcx
Copy link
Contributor

xmfcx commented Mar 6, 2025

I see, I would suggest removing autoware's build and install folders from the container image since they occupy a lot of space.

@youtalk
Copy link
Member Author

youtalk commented Mar 6, 2025

@xmfcx Not only comment but also review this please 🙏

Copy link
Contributor

@xmfcx xmfcx left a comment

Choose a reason for hiding this comment

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

In order to reduce the container image sizes, I'm opposed to relying on /opt/autoware in the CI.

And will work towards removing that folder to reduce the image size.

This folder is not used in the CI so far. And as I've stated in the PR that would make use of this:

There are better ways to overcome that issue.

@youtalk
Copy link
Member Author

youtalk commented Mar 6, 2025

I started installing to /opt/autoware in August last year, so if you didn’t mention it back then, it’s too late now.
autowarefoundation/autoware#5117
Reverting to the prebuilt/dev stages from 1 year ago would be quite hard...

youtalk added 2 commits March 7, 2025 11:16
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
@youtalk youtalk requested a review from mitsudome-r March 7, 2025 02:18
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
@youtalk youtalk requested a review from mitsudome-r March 7, 2025 03:08
Co-authored-by: Mete Fatih Cırıt <xmfcx@users.noreply.github.com>
@youtalk youtalk requested a review from xmfcx March 7, 2025 04:07
@youtalk youtalk merged commit 334497e into autowarefoundation:main Mar 7, 2025
13 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