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 non-Python dependencies with dnf #157

Open
yhtang opened this issue Feb 10, 2022 · 5 comments
Open

Install non-Python dependencies with dnf #157

yhtang opened this issue Feb 10, 2022 · 5 comments
Assignees
Labels
JOSS-review Issues pertaining to the JOSS review

Comments

@yhtang
Copy link

yhtang commented Feb 10, 2022

Hi there,

This is related to the 'installation' checklist item of the JOSS review:
openjournals/joss-reviews#4149.

Could you please also provide the external package names under the DNF/RPM system? This could be very helpful for users of Linux distros such as Fedora, CentOS, and Scientific Linux, etc.

Many thanks and please let me know your thoughts!

@mortele
Copy link
Member

mortele commented Feb 10, 2022

Hi @yhtang, thank you for the suggestion. I have briefly looked into making the package installable (wholesale with all the dependencies packaged) with some of the standard package managers like anaconda and spack. This is on the todo-list but has been pushed back in favor of more pressing matters at the moment.

In all honesty, In my own natural Debian bias I had not even considered making a yum package, but I will investigate how to make it RedHat installable when I get some spare time soon.

@mortele mortele self-assigned this Feb 10, 2022
@yhtang
Copy link
Author

yhtang commented Feb 10, 2022

Oh, I guess there is some misunderstanding here. I am not asking for packaging the software as an rpm package. Rather, I was just wondering what would be the DNF counterparts for the following installation steps from READMD:

sudo apt-get update -y
sudo apt-get install -y pkg-config libhdf5-mpi-dev
python3 -m pip uninstall h5py  # Remove any serial h5py installation present
CC="mpicc" HDF5_MPI="ON" python3 -m pip install --no-binary=h5py h5py

Update: especially the first two lines, since the rest are most likely Python-centric.

@mortele
Copy link
Member

mortele commented Feb 10, 2022

@yhtang Aha, ok, my mistake! The following builds the non-Python dependencies in a fedora:35 docker container and so essentially answers the question:

dnf install -y openmpi-devel hdf5-openmpi-devel python3-devel python3.8
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.8 get-pip.py
export CC=/usr/lib64/openmpi/bin/mpicc
python3.8 -m pip install cython numpy mpi4py
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib/
HDF5_MPI="ON" python3.8 -m pip install --no-cache-dir  --no-binary=h5py h5py===3.6.0

I will have to work out tomorrow how to properly build h5py-mpi, which seems to be a small issue here, and add it to the docs as a separate installation guide section.

Seems like the default Python 3.10.2 in fedora:latest does not play well with h5py, so falling back to Python 3.8.12.

@yhtang
Copy link
Author

yhtang commented Feb 11, 2022

Seems like the default Python 3.10.2 in fedora:latest does not play well with h5py, so falling back to Python 3.8.12.

I wonder if a virtual environment-based recipe could make life slightly easier? 😁

@mortele
Copy link
Member

mortele commented Mar 22, 2022

Hi again @yhtang, the documentation should now be updated with instructions for installing HyMD using apt, dnf, or homebrew, see #172 .

I did not add virtual environment-based installation steps, because I mostly expect users to know themselves when/if that is a good idea for their specific use case. I did however note that on Fedora, the default Python3.10 has some issues compiling MPI-enabled h5py, so maybe it would be good to add a small pyenv guide.

@mortele mortele added the JOSS-review Issues pertaining to the JOSS review label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JOSS-review Issues pertaining to the JOSS review
Projects
None yet
Development

No branches or pull requests

2 participants