SyneRBI / SyneRBI_VM

Virtual Machine with pre-installed SyneRBI software
http://www.ccpsynerbi.ac.uk
Apache License 2.0
3 stars 7 forks source link

upgrade to Ubuntu 18.04 LTS #94

Closed KrisThielemans closed 5 years ago

KrisThielemans commented 6 years ago

It makes sense to upgrade from 16.04 LTS. Gadgetron is/will be using this as reference and needs more recent boost etc.

paskino commented 5 years ago

https://github.com/CCPPETMR/SIRF-SuperBuild/issues/146

current problems:

  1. in Ubuntu 18.04 there's Gnome3. Potentially too big?
  2. Gadgetron doesn't build /usr/bin/ld: cannot find -lplplotcxxd and I still couldn't find libplplotcxxd in ubuntu packages
  3. Gadgetron -- Could NOT find CBLAS (missing: CBLAS_LIBRARY) can't compile
paskino commented 5 years ago

Following this issue I will try the newest gadgetron.

paskino commented 5 years ago

install cmake >= 3.9 as for https://github.com/CCPPETMR/SIRF-SuperBuild/issues/144

paskino commented 5 years ago

What about python version? Shall I upgrade to 3?

KrisThielemans commented 5 years ago

There might be consequences for spyder and jupyter. Would have to be checked.

KrisThielemans commented 5 years ago

Trying the new VM. I got a message "Machine will suspend soon due to inactivity". Not a major problem of ourse, but a bit strange to have a VM suspend. This might help

KrisThielemans commented 5 years ago

Running one of the jupyter notebook. Error

 import matplotlib.pyplot as plt

produces

ImportError: No module named functools_lru_cache

Some possibly related comments on this here with a manual work-around at the bottom:

sudo cp /usr/lib/python2.7/dist-packages/backports/functools_lru_cache.py /usr/local/lib/python2.7/dist-packages/backports/

That makes the import go one step further, but exists at

/usr/lib/python2.7/dist-packages/matplotlib/__init__.py in <module>()
    121 # cbook must import matplotlib only within function
    122 # definitions, so it is safe to import from it here.
--> 123 from . import cbook
    124 from matplotlib.cbook import (
    125     _backports, mplDeprecation, dedent, get_label, sanitize_sequence)

ImportError: cannot import name cbook

The first google result talks about various conflicts with ipython etc.

Funnily enough, after the above cp I don't have the cbook problem on the command line with python nor ipython. Not sure what python we're running from jupyter notebooks. (It says python2).

How did jupyter get installed anyway? I don't see it in our scripts.

This looks a bit like a rabbithole...

KrisThielemans commented 5 years ago

How did jupyter get installed anyway? I don't see it in our scripts.

Sorry. it's in the vagrantfile of course.

paskino commented 5 years ago

BTW, shall we build for python 3 rather than python 2.7?

KrisThielemans commented 5 years ago

I think the problem might be that we're using apt-get to install matplotlib, but pip install jupyter. Probably better to use pip for all python packages.

I haven't been able to try if this works or not, as I can't get an internet connection on the VM. Possibly because my VN is 5.2.12 (too old?). Note that after update_VGA.sh, I have a failure to install some vbox service.

KrisThielemans commented 5 years ago

I think going for python3 might be better, but do think that pip install would in any case be best. I guess would have to be pip3 then.

doesn't look good though.

KrisThielemans commented 5 years ago

By the way, upgrading to VB 5.2.20 and update_VGA.sh doesn't resolve the problem with the vbox service nor the network connection.

KrisThielemans commented 5 years ago

installed VB 5.2.18, reimported, still problem with the vboxadd-service and no network connection. oh well

KrisThielemans commented 5 years ago

By the way, the mouse also moves really slowly for me on this VM (it's much faster on other VMs). Most likely something wrong with the VGA.

KrisThielemans commented 5 years ago

I've created my own VM via vagrant (after upgrading that to 2.2.2).

I have problem that vagrant starts a VM which says that no bootable media are found.

This seems to happen sometimes. I first thought it was due to the new VDI lines, but am now not sure.

I have VGA problems

I have to remove VGA complete as per https://github.com/CCPPETMR/CCPPETMR_VM/issues/77

sudo  apt-get install build-essential module-assistant
sudo /opt/VBoxGuestAdditions-*/uninstall.sh
sudo apt-get purge virtualb*
sudo reboot

and reinstall the VGA. Possibly because you have to re-install the vagrant-vbguest plug-in after reinstalling vagrant, but I think it still didn't work after I did that.

Python matplot lib complains

  from . import tkagg  # Paint image to Tk photo blitter extension.
1:   File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/tkagg.py", line 5, in <module>
1:     from six.moves import tkinter as Tk
1:   File "/usr/lib/python2.7/dist-packages/six.py", line 203, in load_module
1:     mod = mod._resolve()
1:   File "/usr/lib/python2.7/dist-packages/six.py", line 115, in _resolve
1:     return _import_module(self.mod)
1:   File "/usr/lib/python2.7/dist-packages/six.py", line 82, in _import_module
1:     __import__(name)
1:   File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
1:     raise ImportError, str(msg) + ', please install the python-tk package'
1: ImportError: No module named _tkinter, please install the python-tk package

a bit weird this. Possibly caused by still using Python 2.7. matplotlib should really default to something else... The good news is that running things in spyder all works!

paskino commented 5 years ago

currently vagrant up hangs waiting for user input with a scrambled output

default: Unpacking software-properties-common (0.96.24.32.7) over (0.96.24.32.4) ...
    default: Package configuration┌──────────────────┤ Configuring keyboard-configuration ├──────────────────┐│
 The layout of keyboards varies per country, with some countries having   ││
 multiple common layouts. Please select the country of origin for the││
 keyboard of this computer.││││
 Country of origin for the keyboard:││││
Dutch↑││Dzongkha▒││English (Australian)▮││English (Cameroon)▒││English (Ghana)▒││
English (Nigeria)▒││English (South Africa)▒││English (UK)▒││English (US)                                  ↓││││││<Ok><Cancel>│││
└──────────────────────────────────────────────────────────────────────────┘
packing sosreport (3.6-1ubuntu0.18.04.2) over (3.5-1ubuntu3.18.04.1) ...
    default: Preparing to unpack .../81-tmux_2.6-3ubuntu0.1_amd64.deb ...
    default: Unpacking tmux (2.6-3ubuntu0.1) over (2.6-3) ...
    default: Preparing to unpack .../82-cloud-initramfs-copymods_0.40ubuntu1.1_all.deb ...
    default: Unpacking cloud-initramfs-copymods (0.40ubuntu1.1) over (0.40ubuntu1) ...
    default: Preparing to unpack .../83-cloud-initramfs-dyn-netconf_0.40ubuntu1.1_all.deb ...
    default: Unpacking cloud-initramfs-dyn-netconf (0.40ubuntu1.1) over (0.40ubuntu1) ...
    default: Preparing to unpack .../84-libtirpc1_0.2.5-1.2ubuntu0.1_amd64.deb ...
    default: Unpacking libtirpc1:amd64 (0.2.5-1.2ubuntu0.1) over (0.2.5-1.2) ...
    default: Preparing to unpack .../85-open-vm-tools_2%3a10.3.0-0ubuntu1~18.04.3_amd64.deb ...
    default: Unpacking open-vm-tools (2:10.3.0-0ubuntu1~18.04.3) over (2:10.2.0-3ubuntu3) ...
    default: Preparing to unpack .../86-overlayroot_0.40ubuntu1.1_all.deb ...
    default: Unpacking overlayroot (0.40ubuntu1.1) over (0.40ubuntu1) ...
    default: Setting up libquadmath0:amd64 (8.2.0-1ubuntu2~18.04) ...
    default: Setting up python-apt-common (1.6.3) ...
    default: Setting up libgomp1:amd64 (8.2.0-1ubuntu2~18.04) ...
    default: Setting up libatomic1:amd64 (8.2.0-1ubuntu2~18.04) ...
    default: Setting up libpython3.6-stdlib:amd64 (3.6.7-1~18.04) ...
    default: Setting up libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.3) ...
    default: Setting up libapt-inst2.0:amd64 (1.6.8) ...
    default: Setting up libnss-systemd:amd64 (237-3ubuntu10.11) ...
    default: Setting up git-man (1:2.17.1-1ubuntu0.4) ...
    default: Setting up keyboard-configuration (1.178ubuntu2.7) ...
    default:
paskino commented 5 years ago

probably similar to #21 Seems the solution is to add DEBIAN_FRONTEND=noninteractive at this line

paskino commented 5 years ago

fails to find system Boost at the minute...

casperdcl commented 5 years ago

Python matplot lib complains

you need to apt-get install python-dev python-tk

https://github.com/CCPPETMR/SIRF-SuperBuild/blob/master/docker/build_python-ubuntu.sh#L2-L5