google-deepmind / alphafold3

AlphaFold 3 inference pipeline.
Other
5.14k stars 578 forks source link

conda installation fails on manjaro because of libcifpp,also a brief conda installation guide. #49

Closed alchemistcai closed 1 week ago

alchemistcai commented 1 week ago

I try to install af3 by conda in manjaro today,when typing pip install . --no-deps --verbose,I got a different zlib link problem from my ubuntu test.

Cmake can find where is zlib but fails when it compiles libcifpp:

file.cpp:(.....basic_streambufIcS3_E]+0x2d): undefined reference to `inflateEnd'
...
/usr/bin/ld: cif2pdb.cpp:(.text+0x67d36): undefined reference to `deflateEnd'
...and so on

According to libcifpp's related issue,I add set(CMAKE_CXX_FLAGS -lz) in af3's CMakeLists.txt and it works.

Here is my own cmds.Hope these helps archlinux downstream users:

yay -Syyu
yay -S zlib base-devel cmake curl zstd wget git
git clone https://github.com/google-deepmind/alphafold3.git <where you want to clone af3>
cd <where you want to clone af3>
conda create -n af3 python=3.11
conda activate af3
conda install -c bioconda hmmer
pip install -r dev-requirements.txt 
pip install . --no-deps --verbose
build_data

# set ENVs in you bashrc
export XLA_FLAGS="--xla_gpu_enable_triton_gemm=false" 
export XLA_PYTHON_CLIENT_PREALLOCATE=true
export XLA_CLIENT_MEM_FRACTION=0.95

# python run_alphafold3_test.py --model_dir=<where is af3 params>

jax.devices() and jax.lib.xla_bridge.get_backend().platform can find GPU devices in this environment.

However,since I haven't get the params,run_alphafold3_test.py can't test inference,so there may be other problems there.

Feel free to close this issue.