mehrdadh commented on code in PR #11741:
URL: https://github.com/apache/tvm/pull/11741#discussion_r898594762


##########
apps/microtvm/reference-vm/base_box_setup_common.sh:
##########
@@ -0,0 +1,69 @@
+#!/bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -x
+
+# 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
+
+sudo apt update
+sudo apt install -y build-essential
+sudo apt-get --purge remove modemmanager  # required to access serial ports.
+
+# Core
+sudo ~/ubuntu_install_core.sh
+rm -rf ~/ubuntu_install_core.sh

Review Comment:
   removed.



##########
apps/microtvm/reference-vm/arduino/base-box/base_box_setup.sh:
##########
@@ -26,42 +26,19 @@ if [ -e "$HOME/skip_zeroing_disk" ]; then
     skip_zeroing_disk=1
 fi
 
-sudo apt update
-sudo apt install -y build-essential
-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

Review Comment:
   nope, changed them to -f



##########
apps/microtvm/reference-vm/base_box_setup_common.sh:
##########
@@ -0,0 +1,69 @@
+#!/bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -x
+
+# 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
+
+sudo apt update
+sudo apt install -y build-essential
+sudo apt-get --purge remove modemmanager  # required to access serial ports.
+
+# Core
+sudo ~/ubuntu_install_core.sh
+rm -rf ~/ubuntu_install_core.sh
+
+sudo apt install -y --no-install-recommends git \
+     gperf ccache dfu-util device-tree-compiler xz-utils file \
+     gcc gcc-multilib g++-multilib libsdl2-dev
+
+# Cmake
+# NOTE: latest cmake cannot be installed due to
+# https://github.com/zephyrproject-rtos/zephyr/issues/30232

Review Comment:
   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



##########
apps/microtvm/reference-vm/base_box_setup_common.sh:
##########
@@ -0,0 +1,69 @@
+#!/bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -x
+
+# 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

Review Comment:
   good catch, removed it!



##########
apps/microtvm/reference-vm/arduino/base-box/base_box_setup.sh:
##########
@@ -26,42 +26,19 @@ if [ -e "$HOME/skip_zeroing_disk" ]; then
     skip_zeroing_disk=1
 fi
 
-sudo apt update
-sudo apt install -y build-essential
-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
 
-sudo apt install -y --no-install-recommends git \
-     cmake cmake-data \
-     ninja-build gperf ccache dfu-util device-tree-compiler wget \
-     python3-dev python3-pip python3-setuptools python3-tk python3-wheel 
xz-utils file \
-     make gcc gcc-multilib g++-multilib libsdl2-dev
-
-OLD_HOSTNAME=$(hostname)
-sudo hostnamectl set-hostname microtvm
-sudo sed -i.bak "s/${OLD_HOSTNAME}/microtvm.localdomain/g" /etc/hosts
-
-# Poetry deps
-sudo apt install -y python3-venv
-
-# TVM deps
-sudo apt install -y llvm
-
-# ONNX deps
-sudo apt install -y protobuf-compiler libprotoc-dev
+# Poetry
+sed -i "/^# If not running interactively,/ i source \$HOME/.poetry/env" 
~/.bashrc

Review Comment:
   this is just added to top of the .bashrc file. Also I only moved this part 
from other scripts



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to