forked from Submitty/Submitty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME_utm_arm.txt
193 lines (120 loc) · 5.58 KB
/
README_utm_arm.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
*************WORK IN PROGRESS************
On an M1 Mac laptop, we cannot use virtual box, so follow these instructions instead:
1. On the host computer, create a new directory named GIT_CHECKOUT to
hold all of the Submitty git repositories. Manually checkout these
repositories (and make sure they are up-to-date):
From https://github.com/Submitty
Submitty
AnalysisTools
AnalysisToolsTS
Lichen
RainbowGrades
SysadminTools
Tutorial
And also create directory:
vendor/
and checkout from:
git clone https://github.com/nlohmann/json.git
to this path:
vendor/nlohmann/json/
And optionally (currently private repos), from https://github.com/Submitty
LichenTestData
CrashCourseCPPSyntax
*** FIXME: Currently we checkout all of the repositories manually,
since the VM cannot write to the shared directory? Unlike how
we currently setup with vagrant, we may not be able to share
multiple directories ***
2. Install UTM
https://mac.getutm.app/
Current version: 3.5.1
3. Download and save the Ubuntu 20.04 ARM Server ISO
https://mac.getutm.app/gallery/ubuntu-20-04
https://cdimage.ubuntu.com/releases/20.04.4/release/
4. Launch UTM, and through the UTM GUI, press "+" to create a new VM:
Select "Virtualize"
Select "Linux"
Under Boot ISO Image: browse to select the Ubuntu 20.04 ISO you just downloaded.
memory -> 4096 mb (or more)
CPU Cores -> 2 (or more)
Storage, 64GB, press "Next"
Shared Directory, Browse to specify the "GIT_CHECKOUT" directory on your host
Review the Summary, press "Save"
5. Now press the play button to boot & install the guest machine.
Do the interactive Ubuntu Server installation...
* "Install Ubuntu Server"
... you'll wait a while here ...
* "English"
* (do not upgrade to Ubuntu 22.04 -- "Continue without updating")
* "Done" on keyboard layout
* "Done" on network connections
* "Done" on configure proxy
* "Done" on alternate mirror
* "Done" on default for storage configuration / storage layout
* "Done" on default for storage configuration / file system
- set the "device" "mounted at /" to be most of your space (e.g. 60GB)
it probably defaulted to 30BG (leaving 30GB of free)
* "Continue" on confirm destructive action
* Fill in the profile setup (set a <USERNAME> & <PASSWORD>)
* Press "Done" on Ubuntu Advantage
* Select "Install OpenSSH server" and then "Done"
* "Done" on featured server snaps
It will initially say "Installing system" at the top of the page and then quickly switch to "Install complete!" ...
... now wait why the server does updates ...
Wait a while, until it says "Reboot now"
select "Reboot now"
6. After waiting a little while...
NOTE: reboot only seems to stop. It doesn't actually halt & restart.
From the main UTM screen:
* Turn off the virtual machine by pressing the square symbol.
If it says "do you want to force stop this VM and lose all unsaved data? stop or cancel"...
* "Clear"/disconnect the removable CD/DVD drive (the ISO).
* Click on the sliders icon in the upper right to edit the VM
settings again.
under the "Network" tab, add port forwarding:
guest port 22 -> host 1234 (or anything for ssh below)
guest port 1511 -> host 1511
guest port 8443 -> host 8443
guest port 5432 -> host 16442
press "save".
* Then press the play icon to boot the machine again.
7. To ssh from your host machine to the guest vm:
ssh -p 1234 <USERNAME>@localhost
8. To share directories between host & guest machines:
On the guest machine:
sudo apt install -y spice-vdagent spice-webdavd
sudo apt install -y davfs2
* Answer the question "YES" and grant access to unpriviledged users *
sudo mkdir -p /usr/local/submitty/GIT_CHECKOUT
NOTE: The command below must be re-run each time the guest machine
is rebooted. It will require interactively entering the username &
password for the host machine. You could put those credentials on
the command line, and in a guest machine startup script, but that
may be a security concern.
sudo mount -t davfs -o noexec http://127.0.0.1:9843 /usr/local/submitty/GIT_CHECKOUT
If you get an error trying to run this from the ssh terminal, try
running it directly in the UTM VM GUI terminal.
If you get an error mounting the shared directory, you can try
running the umount command below, and then repeat the mount command
above. If that doesn't work you can try halt, stop, and play
(rebooting) the VM and then try again.
sudo umount /usr/local/submitty/GIT_CHECKOUT
9. TEMPORARY HACK STEP
open .setup/pip/system_requirements.txt
comment out the opencv and onnx version installations (compilation from scratch fails)
#opencv-python==3.4.10.37
#onnxruntime==1.8.1
#onnx==1.9.0
10. Do Submitty system setup and installation:
On the guest machine:
sudo bash /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/install_system.sh --vagrant
Hopefully it completes without error or network problems... if you
have errors, you can try to re-run the above command. However, if
it crashes in the middle of creating the sample course data, you
may need to do:
sudo bash /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/bin/recreate_sample_courses.sh
11. After installation, to fix opencv & onnx:
sudo pip install opencv-python
sudo pip install onnxruntime
sudo apt install libgl1-mesa-glx
12. When finished, access the Submitty website from a browser on your host machine:
http://localhost:1511/