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

[microTVM] Refactor RVM scripts and fix DNS network issue #11741

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

mehrdadh
Copy link
Member

@mehrdadh mehrdadh commented Jun 15, 2022

@mehrdadh mehrdadh changed the title [microTVM] Refactor RVM scripts and fix a network issue [microTVM] Refactor RVM scripts and fix DNS network issue Jun 15, 2022
@github-actions github-actions bot requested a review from areusch June 15, 2022 23:45
@mehrdadh
Copy link
Member Author

cc @guberti

@mehrdadh mehrdadh force-pushed the microtvm/fix_pip_version branch from 88fc13f to 58e69ea Compare June 15, 2022 23:52
@github-actions github-actions bot requested a review from gromero June 15, 2022 23:52
Copy link
Member

@guberti guberti 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, 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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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"?

Copy link
Member Author

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

Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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.

Copy link
Member Author

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

@mehrdadh mehrdadh force-pushed the microtvm/fix_pip_version branch from 58e69ea to 2e032c4 Compare June 16, 2022 00:51
Copy link
Member Author

@mehrdadh mehrdadh left a 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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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

Copy link
Member

@guberti guberti left a 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
Copy link
Member

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
Copy link
Member

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?

@mehrdadh
Copy link
Member Author

@guberti thanks for the review! Let's add those changes in a separate PR since I'm trying to unblock the CI.

@areusch areusch merged commit 7a5f4e0 into apache:main Jun 16, 2022
@mehrdadh mehrdadh deleted the microtvm/fix_pip_version branch June 16, 2022 19:49
areusch added a commit to areusch/tvm that referenced this pull request Jun 16, 2022
areusch added a commit to areusch/tvm that referenced this pull request Jun 16, 2022
zxybazh pushed a commit to zxybazh/tvm that referenced this pull request Jun 16, 2022
areusch added a commit that referenced this pull request Jun 16, 2022
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