SIRF-SuperBuild icon indicating copy to clipboard operation
SIRF-SuperBuild copied to clipboard

Conda

Open paskino opened this issue 7 years ago • 19 comments

initial working recipe for linux.

OSX would need tweak on build.sh.

The branch should be aligned with setup_py #109

paskino avatar Apr 26 '18 05:04 paskino

  1. merge https://github.com/CCPPETMR/SIRF/pull/160
  2. merge #109
  3. rebase this and merge

close #106?

casperdcl avatar Apr 26 '18 08:04 casperdcl

I agree with you.

paskino avatar Apr 26 '18 10:04 paskino

should we add a conda build to Travis? Maybe it's already done via the docker build.

that'd allow you to test on OSX.

KrisThielemans avatar Apr 27 '18 08:04 KrisThielemans

EDIT new strategy:

  • [x] @paskino merge https://github.com/CCPPETMR/SIRF/pull/160 (no dependencies)
  • [x] @casperdcl rebase and merge https://github.com/CCPPETMR/SIRF/pull/163 (no dependencies)
  • [ ] @paskino @casperdcl rebase and merge this (#112, depends on both the above)

misc:

  • [ ] add conda build to travis (I think getting on conda-forge would avoid this)
  • [x] close #106

casperdcl avatar Apr 27 '18 15:04 casperdcl

got Abofazl (postdoc) to try via conda in a vbox on windows

conda create -n sirf python=3
conda activate sirf
conda install -c conda-forge -c paskino sirf
  • had to apt-get install libace-dev git
  • had to pip install -e git+https://github.com/ismrmrd/ismrmrd-python-tools.git#egg=ismrmrd-python-tools
  • had to download examples and data (https://github.com/CCPPETMR/SIRF/tree/master/examples/Python and https://github.com/CCPPETMR/SIRF_data/tree/master/examples)
  • had to export SIRF_PATH
  • still got errors when e.g. running MR/interactive (edited)
error: ??? "'unhandled' exception caught at line 429 of /media/d/miniconda3/conda-bld/sirf_1525355467409/work/build/sources/SIRF/src/xGadgetron/cGadgetron/cgadgetron.cpp\nthe reconstruction engine output may provide more information"

casperdcl avatar May 08 '18 17:05 casperdcl

Thanks for the extensive report. I was aware of all the issues except the ismrmrd tools. I haven't tried all the demos/interactive, but just tried some of them.

  1. libace: I'm working on that and I've added it to the SuperBuild
  2. SIRF_PATH and example data. Can we do something about it? Maybe create another conda package with the data inside?
  3. ismrmrd-python-tools aren't installed in the install directory, therefore I missed them.
  4. which MR interactive example failed?

paskino avatar May 08 '18 20:05 paskino

Data and examples is #102.

KrisThielemans avatar May 08 '18 21:05 KrisThielemans

@casperdcl: so far as i can see examples in MR/interactive require simulated_MR_2D_cartesian.h5, which is not in https://github.com/CCPPETMR/SIRF_data/tree/master/examples

@ckolbPTB: why did you not use existing_filepath function? the error message would be more meaningful

also, the graphics in coil_combination.py crashes python when run from command line (spyder survives)

evgueni-ovtchinnikov avatar May 09 '18 08:05 evgueni-ovtchinnikov

I guess we'll end up creating several recipes which create the packages sirf depends on, and sirf. As we discussed, we could pass a parameter to the superbuild and build only part of it. Now I don't remember which parameter is exactly.

paskino avatar May 12 '18 22:05 paskino

currently you'd run CMake as usual. then just say make gadgetron or whatever. A bit wasteful, but minimal effort...

KrisThielemans avatar May 12 '18 22:05 KrisThielemans

this is fine-tuning of course. leave it for later!

KrisThielemans avatar May 12 '18 22:05 KrisThielemans

I wouldn't mind issuing cmake 3 or 4 times!

paskino avatar May 13 '18 07:05 paskino

@evgueni-ovtchinnikov Sorry for the late reply but I was on holiday. Where should I have used existing_filepath function? Feel free to add it if you think it helps.

Concerning coil_combination.py: This is intended to be run as a script using a Python IDE and not from the terminal. There is a comment at the beginning explaining this.

ckolbPTB avatar May 15 '18 06:05 ckolbPTB

I guess we'll end up creating several recipes which create the packages sirf depends on, and sirf.

helps that STIR is now in conda-forge

casperdcl avatar Mar 02 '19 12:03 casperdcl

helps that STIR is now in conda-forge

First need to resolve https://github.com/UCL/STIR/issues/211

KrisThielemans avatar Mar 02 '19 13:03 KrisThielemans

Directories to pass to External_SIRF.cmake are defined

paskino avatar Jul 09 '19 21:07 paskino

STIR 4.0.1 conda might work ok. There's https://anaconda.org/inati/ismrmrd but it's out-of-date. Might be worth checking with them.

KrisThielemans avatar May 11 '20 08:05 KrisThielemans

By the way, I'm not 100% sure what the strategy here was/is, but I think we should have a SIRF-only conda package (with its dependencies, most obtained via conda). I would at least initially not attempt gadgetron-via-conda.

KrisThielemans avatar May 11 '20 08:05 KrisThielemans

See https://github.com/gadgetron/gadgetron/pull/1036 for Gadgetron's conda efforts

KrisThielemans avatar Jan 05 '22 14:01 KrisThielemans