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

Install process improvements #1105

Open
regisoc opened this issue Apr 19, 2024 · 1 comment
Open

Install process improvements #1105

regisoc opened this issue Apr 19, 2024 · 1 comment

Comments

@regisoc
Copy link
Contributor

regisoc commented Apr 19, 2024

Some improvements could be done in the README:

  1. Section 3: MINC install could be updated. We are using Ubuntu (only?) and not following the full MINC install (e.g. no test deb download for the last MINC version), we can add MINC deps at the beginning of section 3.
# deps
sudo apt-get install libc6 libstdc++6 imagemagick perl
# visualization
sudo apt-get install libgl1-mesa-glx libglu1-mesa
# download minc deb
# wget beast lib + models lib + main minc lib
# sudo dpkg -i minc-toolkit-<version>.deb bic-mni-models-<version>.deb beast-library-<version>.deb
  1. MINC models should be installed in /opt/minc/share -> need to manually check if it is not empty
  2. running ./install_imaging.sh script, this warning happened. We should run these by default if they are mandatory
New CPAN.pm version (v2.36) available.
  [Currently running version is v2.28]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.
  1. running ./install_imaging.sh, error at the end of the execution. Log:
...

Creating loris-mri Python virtualenv in /opt/Loris-MRI/bin/mri/python_virtualenvs/loris-mri-python/
created virtual environment CPython3.10.12.final.0-64 in 1636ms
  creator CPython3Posix(dest=/opt/Loris-MRI/bin/mri/python_virtualenvs/loris-mri-python, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/lorisadmin/.local/share/virtualenv)
    added seed packages: pip==22.0.2, setuptools==59.6.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Installing the Python libraries into the loris-mri virtualenv...
Collecting mne
  Downloading mne-1.6.1-py3-none-any.whl (8.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 16.4 MB/s eta 0:00:00
Collecting mne-bids>=0.6
  Downloading mne_bids-0.14-py2.py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 17.1 MB/s eta 0:00:00
Collecting protobuf>=3.0.0
  Downloading protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl (302 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 302.8/302.8 KB 30.2 MB/s eta 0:00:00
Collecting pybids==0.14.0
  Using cached pybids-0.14.0-py3-none-any.whl (3.2 MB)
Collecting mysqlclient
  Downloading mysqlclient-2.2.4.tar.gz (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 KB 12.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      /bin/sh: 1: pkg-config: not found
      /bin/sh: 1: pkg-config: not found
      /bin/sh: 1: pkg-config: not found
      Trying pkg-config --exists mysqlclient
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
      Trying pkg-config --exists mariadb
      Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
      Trying pkg-config --exists libmariadb
      Command 'pkg-config --exists libmariadb' returned non-zero exit status 127.
      Traceback (most recent call last):
        File "/opt/Loris-MRI/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/opt/Loris-MRI/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/Loris-MRI/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-vizsygo0/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-vizsygo0/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-vizsygo0/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 155, in <module>
        File "<string>", line 49, in get_config_posix
        File "<string>", line 28, in find_package_name
      Exception: Can not find valid pkg-config name.
      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Creating the data directories

Modifying environment script


Creating MRI config file
config file is located at /opt/Loris-MRI/bin/mri/dicom-archive/.loris_mri/prod

Creating python database config file with database credentials
config file for python import scripts is located at /opt/Loris-MRI/bin/mri/dicom-archive/.loris_mri/database_config.py

Installing DICOM Toolkit (May prompt for sudo password)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dcmtk is already the newest version (3.6.6-5).
0 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
Populating database configuration entries for the Imaging Pipeline and LORIS-MRI code and images Path:
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
  1. TPCCLIB install needs deps for compiling (needed?). They are general ones. On Ubuntu, we can add them as general deps.
# build deps
sudo apt install build-essential checkinstall cmake
# 
  1. On TPCCLIB website is not easy to read. We can add actual repository link and instructions to ease the pain:

Bonus:

EDIT: this was not working last week. I do not know what changed in between but it works now.

$ ./tools/replicate_raisinbread_for_mcin_dev_vm.pl 
Can't locate NeuroDB/ExitCodes.pm in @INC (you may need to install the NeuroDB::ExitCodes module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at ./tools/replicate_raisinbread_for_mcin_dev_vm.pl line 38.
BEGIN failed--compilation aborted at ./tools/replicate_raisinbread_for_mcin_dev_vm.pl line 38.

Linked to #1074

@gsch-cmi
Copy link

Can I ask what version of Ubuntu you are testing the install on? I was trying to install on ubuntu noble (24), but it seems like libgl1-mesa-glx is no longer available in 24, and (i think) has been replaced with other packages, e.g. (libglx-mesa0, libglu1-mesa) but i'm not sure if installing these would work for the MRI module tools. Do you have any insight into this and whether documentation could be updated to specify the ubuntu versions for which the install works as specified?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants