Closed fortune-max closed 2 years ago
I am not sure if it's a common enough issue but on Mac it seems you have to install hdf5 library perhaps using homebrew as the python dependency (hf5py) requires the library to be present locally first.
Followed the installation instructions here: https://ersilia.gitbook.io/ersilia-book/quick-start/installation
To fix run:
brew install hdf5@1.8
Then on ARM chip Macs:
ln -s /opt/homebrew/opt/hdf5@1.8/lib/libhdf5.10.dylib /usr/local/lib/libhdf5.dylib
On Intel chip Macs:
ln -s /usr/local/opt/hdf@1.8/lib/libhdf5.10.dylib /usr/local/lib/libhdf5.dylib
Another Mac specific issue I encountered while setting up.
The .bashrc file is read when starting up ersilia.
As my default shell is zsh, no .bashrc file exists. This causes ersilia/default.py/bashrc_cli_snippet
function call to fail (line 119).
It is not immediately obvious this is the cause from the error thrown.
Running touch ~/.bashrc
fixed this locally for me.
Running ersilia fetch molecular-weight
kept failing for me until I ran
conda create -n eosbase-bentoml-0.11.0-py37
and activated environment
conda activate eosbase-bentoml-0.11.0-py37
Kept throwing a source environment not found
File "/Users/fortune/code/ersilia/ersilia/utils/conda.py", line 297, in clone
raise Exception("{0} source environment does not exist".format(src_env))
Exception: eosbase-bentoml-0.11.0-py37 source environment does not exist
For Apple Silicon, the h5py dependency doesn't work with pip install
as it has to be built from source and the headers and shared library files are not present.
Before running pip install -e .
, make sure to install hdf5 with brew
brew install hdf5@1.8
Add the necessary flags to your session to allow local compilation of h5py:
export LDFLAGS="-L/opt/homebrew/opt/hdf5@1.8/lib"
export CPPFLAGS="-I/opt/homebrew/opt/hdf5@1.8/include"
Make the shared library accessible to compiler
ln -s /opt/homebrew/opt/hdf5@1.8/lib/libhdf5.10.dylib /usr/local/lib/libhdf5.dylib
Then finally install erisilia dependencies
pip install -e .
FOR INTEL MACs:
Replace all /opt/homebrew/
with /usr/local/
Screenshot of a model in use to determine molecular weight of aspirin.
Local catalog of installed models.
Hi @fortune-max
Thanks for checking the set up and installation of Ersilia. Please, could you report those problems in the form of a bug tracker opening a new issue for each one of them?
Sure, I'll be glad to help make the setup process go smoother for people sharing a similar environment as I am.
Hi @GemmaTuron
Is there a reason the dependencies are being installed using pip instead of with conda install?
Using conda install --file requirements.txt
instead of pip install -e .
is preferable to me and actually works around the h5py dependency compilation installation issue I faced.
See https://ersilia.gitbook.io/ersilia-book/quick-start/installation
I have attempted to install ersilia's dependencies using conda. Unfortunately a number of them are unavailable from conda's repo alone. I think the best way would be to have the instructions say
conda install h5py
Then
pip install -e .
to get around the issue for Mac users. I will detail more of my findings in the issue I open.
Hi @fortune-max
Thanks for the suggestions we will look into them as soon as possible. Unfortunately we won't be able to provide feedback before the application deadline so please go ahead and make your application listing these contributions so far.
Thanks!
Sure Gemma,
Glad to have helped. Will add to contributions now.
Applicant:
Welcome to the Ersilia Open Source Initiative. This issue will serve to track all your contributions for the project “Improve the Ersilia Model Hub, a FOSS platform offering pre-trained AI/ML models for research”.
Please tick the tasks as you complete them. To make a final application it is not required to have completed all tasks. This project requires knowledge of the Python programming language. The tasks are not ordered from more to less important, they are simply related to different skills. Start where you feel most comfortable.
Initial steps
[x] Comment under this issue explaining why you are interested in this project.
Installation of the Ersilia Model Hub
ersilia
library.[x] Fetch at least 3 models from the Ersilia Model Hub. You can find these models with the
ersilia catalog
command. Add a screenshot of the local catalog (ersilia catalog –local
)CLI
[ ] Suggest at least one missing feature in the CLI (one sentence is enough, for example: “Add command to estimate memory usage of a particular model”).
Python library
ersilia
as a Python library (find more information here). Ideally, use a Jupyter notebook.ersilia
Python library. The app can have an input and an output box, and perhaps a few models to select. Add a screenshot of the app as seen in your browser.[ ] Write a docstring for the ErsiliaModel class. Use the Google Python Style guide. Paste the docstring as a comment below (do not use a PR).
Scientific content
[ ] Search the scientific literature and suggest 3 new models (comment in this issue) that would be relevant to incorporate in the Hub.
Other
If you have interest in working on related topics, or have new suggestions, please do the following
[ ] Link in the comments any other PR you have contributed to.
Community
[ ] If you have feedback from your peers, answer it in this issue.
Final application