DiamondLightSource / PySIMRecon

Easy to use wrapper for pyCUDAsirecon, allowing the use of DV files without PRIISM
GNU General Public License v3.0
0 stars 2 forks source link

Installing from scratch. #25

Closed iandobbie closed 1 month ago

iandobbie commented 1 month ago

I know that this is totally my ignorace as I just don't use conda but I just cant get this to install.

I have no idea how to install a conda package from a local directory so as a last resort I just did a python -m pip install which seemed to be doing roughly the right thing but.....

(pysimrecon) C:\Users\idobbie1\src\PySIMRecon>python -m pip install --editable .
Obtaining file:///C:/Users/idobbie1/src/PySIMRecon
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting matplotlib~=3.9.2 (from PySIMRecon==0.1.0)
  Using cached matplotlib-3.9.2-cp312-cp312-win_amd64.whl.metadata (11 kB)
Collecting mrc>=0.3.1 (from PySIMRecon==0.1.0)
  Using cached mrc-0.3.1-py3-none-any.whl.metadata (22 kB)
Collecting numpy~=1.26.4 (from PySIMRecon==0.1.0)
  Using cached numpy-1.26.4-cp312-cp312-win_amd64.whl.metadata (61 kB)
INFO: pip is looking at multiple versions of pysimrecon to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement pycudasirecon~=0.1.0 (from pysimrecon) (from versions: none)
ERROR: No matching distribution found for pycudasirecon~=0.1.0

(pysimrecon) C:\Users\idobbie1\src\PySIMRecon>

So is it just not finding pycudasirecon ?

iandobbie commented 1 month ago

Tried to add pycudasirecon with a conda install command and it dies with cuda version conflicts.

iandobbie commented 1 month ago

Ok, made progress.

1) The cuda installs in conda rely on the version of cuda you have installed from nvidia outside conda. This is totally opaque.

2) The cast off machine I have been playing with has too old a card to use a modern enough cuda version to allow the software stack to run.

So I tried updating the cuda tools on the windows machine but only got to cuda 9 and my reading of the errors is that the overall software stack needs at least cuda 10.2. I moved to another machine with a much newer card and things mostly just worked.

1) the system already had the nvidia cuda tools installed

2) I installed miniconda

3) I installed cudasirecon with "conda install -c confa-forge cudasirecon

4) I cloned the git repository with "git clone git@github.com:DiamondLightSource/PySIMRecon.git"

5) I tried to installed with "cd PySIMRecon ; python -m pip install --editable ."

This failed as it couldn't find a usable version of pycudasirecon. It was trying to install 0.1.0 which it didn't think would work

6) used conda to install pycudasirecon with "conda install pycudasirecon"

7) repeat the pip install and this worked.

Need to test things. Overall I think you need to add to the readme an install section which has,

Maybe need to add info about venv's or other issues if you want.

thomasmfish commented 1 month ago

Hi Ian, I've done a fairly basic section to the README in #26, but I haven't looked into the cuda tools version yet. Maybe I'll try some drop-downs with further details for some steps too.

thomasmfish commented 1 month ago

What version did you end up having success with? Looking at the cudasirecon-feedstock, it looks like requires >11.2 but I'd like to confirm whether I'm looking at the right thing before adding any information about that.

iandobbie commented 1 month ago

My reading of the conda error messages are that different versions of cudasirecon require different versions, with cuda version 10.2 need for cudasirecon 1.0, 11.something for 1.1 and 12 for 1.2.

I went to our beefy image processing workstation which has a new card and cuda 12.something. I still have no idea how to find this out except in the conda output

thomasmfish commented 1 month ago

It looks like currently cudasirecon is only built for 11.8 or 12.0 (see the matrix section of these files).

thomasmfish commented 1 month ago

Hi Ian, I've done some digging around in the conda-forge docs and feedstocks and added some information to the README in #26 (direct link to the updated README). Do you have any notes? Am I missing anything that you would have found useful, or have I written anything that doesn't match with your experience?

thomasmfish commented 1 month ago

Closed as #26 has been merged