-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[microTVM] Refactor RVM scripts and fix DNS network issue #11741
Conversation
cc @guberti |
88fc13f
to
58e69ea
Compare
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.
Looks good, just a few nits. Thanks for removing so much duplicate code!
sudo apt-get --purge remove modemmanager # required to access serial ports. | ||
# Install common configs | ||
~/base_box_setup_common.sh | ||
rm -rf ~/base_box_setup_common.sh |
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.
Do we need the -rf
flags here or in the other base_box_setup.sh
?
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.
nope, changed them to -f
# ONNX deps | ||
sudo apt install -y protobuf-compiler libprotoc-dev | ||
# Poetry | ||
sed -i "/^# If not running interactively,/ i source \$HOME/.poetry/env" ~/.bashrc |
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.
Add a comment explaining this line? Why are we looking for "If not running interactively"?
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.
this is just added to top of the .bashrc file. Also I only moved this part from other scripts
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.
Can we just add the line to the top of the file then, instead of relying on the exact wording of the comment? Say,
sed -i "1i source \$HOME/.poetry/env" ~/.bashrc
May be out of scope for this PR, though.
|
||
# Core | ||
sudo ~/ubuntu_install_core.sh | ||
rm -rf ~/ubuntu_install_core.sh |
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.
Same as above - do we need -rf
flags?
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.
removed.
# Fix network DNS issue | ||
sudo sed -i 's/DNSSEC=yes/DNSSEC=no/' /etc/systemd/resolved.conf | ||
sudo systemctl restart systemd-resolved | ||
sudo cat /etc/systemd/resolved.conf |
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.
Do we want to keep printing /etc/systemd/resolved.conf
to the console?
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.
good catch, removed it!
|
||
# Cmake | ||
# NOTE: latest cmake cannot be installed due to | ||
# https://github.com/zephyrproject-rtos/zephyr/issues/30232 |
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.
This GitHub issue has been closed - are we still blocked from using the latest cmake? This will also downgrade the version of cmake being used for Arduino.
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.
I should remove this note. Because the reason I kept this is because the default cmake that was installed without this command, it was really old. so I'm just keeping this to force it to update cmake from version like 3.13 to 3.22.2
58e69ea
to
2e032c4
Compare
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.
@guberti thanks for the review! PTAL
sudo apt-get --purge remove modemmanager # required to access serial ports. | ||
# Install common configs | ||
~/base_box_setup_common.sh | ||
rm -rf ~/base_box_setup_common.sh |
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.
nope, changed them to -f
# ONNX deps | ||
sudo apt install -y protobuf-compiler libprotoc-dev | ||
# Poetry | ||
sed -i "/^# If not running interactively,/ i source \$HOME/.poetry/env" ~/.bashrc |
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.
this is just added to top of the .bashrc file. Also I only moved this part from other scripts
# Fix network DNS issue | ||
sudo sed -i 's/DNSSEC=yes/DNSSEC=no/' /etc/systemd/resolved.conf | ||
sudo systemctl restart systemd-resolved | ||
sudo cat /etc/systemd/resolved.conf |
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.
good catch, removed it!
|
||
# Core | ||
sudo ~/ubuntu_install_core.sh | ||
rm -rf ~/ubuntu_install_core.sh |
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.
removed.
|
||
# Cmake | ||
# NOTE: latest cmake cannot be installed due to | ||
# https://github.com/zephyrproject-rtos/zephyr/issues/30232 |
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.
I should remove this note. Because the reason I kept this is because the default cmake that was installed without this command, it was really old. so I'm just keeping this to force it to update cmake from version like 3.13 to 3.22.2
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.
Two more nits, but should be fine to merge as-is.
# ONNX deps | ||
sudo apt install -y protobuf-compiler libprotoc-dev | ||
# Poetry | ||
sed -i "/^# If not running interactively,/ i source \$HOME/.poetry/env" ~/.bashrc |
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.
Can we just add the line to the top of the file then, instead of relying on the exact wording of the comment? Say,
sed -i "1i source \$HOME/.poetry/env" ~/.bashrc
May be out of scope for this PR, though.
|
||
# Python | ||
sudo ~/ubuntu_install_python.sh | ||
rm -f ~/ubuntu_install_python.sh |
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.
Are these scripts write protected? Do we need the -f
flag either?
@guberti thanks for the review! Let's add those changes in a separate PR since I'm trying to unblock the CI. |
* refactor scripts * address comments
cc @alanmacd @areusch @gromero