1 """Ubuntu 22.04 on a hardware of your choice. This is the base image for the AI/ML framework training host installation"""
3 import geni.portal as portal
4 # Import the ProtoGENI library.
5 import geni.rspec.pg as rspec
9 pc.defineParameter('hardware_type', 'Hardware type', portal.ParameterType.NODETYPE, '')
11 params = pc.bindParameters()
13 request = pc.makeRequestRSpec()
15 node = request.RawPC('node-0')
16 node.hardware_type = params.hardware_type
17 node.disk_image = 'urn:publicid:IDN+emulab.net+image+emulab-ops//UBUNTU22-64-STD'
19 # add docker group and manipulate certain ssh key access for root
20 node.addService(rspec.Execute(shell="bash", command="sudo groupadd docker && sudo usermod -aG docker root && sudo chown osc_int -R /root && tail -1 ~/.ssh/authorized_keys >> /root/.ssh/authorized_keys && rm /root/.ssh/id_rsa* && sudo chown root -R /root"))
22 pc.printRequestRSpec(request)