Closed johnnytam100 closed 3 weeks ago
I have the same problem. tried to use numpy 1.22.0 (requirements.txt) But then completely different errors occur...
Collecting numpy==1.22.0 (from -r /app/alphafold/requirements.txt (line 10)) Downloading numpy-1.22.0.zip (11.3 MB) 11 .3/11.3 MB 114.9 MB/s eta 0 :00:00 Installing build dependencies...done Getting requirements to build wheel ... error error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/opt/conda/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Adjusting the Singularity.def and changing the MiniConda version to my Python version solved the problem. Use my Python version instead of latest.
wget -q -P /tmp \ https://repo.anaconda.com/miniconda/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh\ && bash /tmp/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh -b -p /opt/conda \ && rm /tmp/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh
Hi @JuergenUniVie ! Thank you for the comment! I have changed inside Singularity.def to my python version but still didn't work..
For the miniconda package, do you mean to install it?
Hi @johnnytam100
I changed the lines with MiniConda in Singularity.def so that the Conda version uses Python3.8 and not the latest version. I'm using Python 3.8.
python --version Python 3.8.17
Change the lines so that the appropriate MiniConda version matches your installed Python version:
Singularity.dev:
wget -q -P /tmp \ https://repo.anaconda.com/miniconda/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh \ && bash /tmp/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh -b -p /opt/conda \ && rm /tmp/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh
if you use Python 3.10 then replace with:
https://repo.anaconda.com/miniconda/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh && bash/tmp/Miniconda3-py310_23.11.0-2-Linux-x86_64.sh .....
However, it may only work with Python 3.8 as I find several references to it, which you would then have to adapt to your Python version.
pdbfixer \ pip \ python=3.8 \ && conda clean --all --force-pkgs-dirs --yes
wget -q -P /app/alphafold/alphafold/common/ \ https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
pip3 install --upgrade pip --no-cache-dir \ && pip3 install -r /app/alphafold/requirements.txt --no-cache-dir \ && pip3 install --upgrade --no-cache-dir \ jax==0.3.25 \ jaxlib==0.3.25+cuda11.cudnn805 \ -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
cd /opt/conda/lib/python3.8/site-packages patch -p0 < /app/alphafold/docker/openmm.patch
Thanks! It worked! My final Singularity.def
looks like this:
Bootstrap: docker
From: nvidia/cuda:11.1.1-cudnn8-runtime-ubuntu18.04
Stage: spython-base
%files
. /app/alphafold
%post
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# FROM directive resets ARGS, so we specify again (the value is retained if
# previously set).
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
build-essential \
cmake \
cuda-command-line-tools-11-1 \
git \
hmmer \
kalign \
tzdata \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoremove -y \
&& apt-get clean
# Compile HHsuite from source.
/bin/rm -rf /tmp/hh-suite \
&& git clone --branch v3.3.0 https://github.com/soedinglab/hh-suite.git /tmp/hh-suite \
&& mkdir /tmp/hh-suite/build \
&& cd /tmp/hh-suite/build \
&& cmake -DCMAKE_INSTALL_PREFIX=/opt/hhsuite .. \
&& make -j 4 && make install \
&& ln -s /opt/hhsuite/bin/* /usr/bin \
&& cd / \
&& /bin/rm -rf /tmp/hh-suite
# Install Miniconda package manager.
wget -q -P /tmp \
https://repo.anaconda.com/miniconda/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh \
&& bash /tmp/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh -b -p /opt/conda \
&& rm /tmp/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh
# Install conda packages.
PATH="/opt/conda/bin:/usr/local/cuda-11.1/bin:$PATH"
conda install -qy conda==4.13.0 \
&& conda install -y -c conda-forge \
openmm=7.5.1 \
cudatoolkit==11.1.1 \
pdbfixer \
pip \
python=3.8 \
&& conda clean --all --force-pkgs-dirs --yes
### /bin/cp -r . /app/alphafold
wget -q -P /app/alphafold/alphafold/common/ \
https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
# Install pip packages.
# N.B. The URL specifies the list of jaxlib releases.
pip3 install --upgrade pip --no-cache-dir \
&& pip3 install -r /app/alphafold/requirements.txt --no-cache-dir \
&& pip3 install --upgrade --no-cache-dir \
jax==0.3.25 \
jaxlib==0.3.25+cuda11.cudnn805 \
-f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
# Apply OpenMM patch.
cd /opt/conda/lib/python3.8/site-packages
patch -p0 < /app/alphafold/docker/openmm.patch
# Add SETUID bit to the ldconfig binary so that non-root users can run it.
chmod u+s /sbin/ldconfig.real
### SETUID bit does not matter: Apptainer does not allow suid commands
### Workaround below is to use /mnt/out/ld.so.cache for the ld cache file
%environment
export PATH="/opt/conda/bin:/usr/local/cuda-11.1/bin:$PATH"
%runscript
cd /app/alphafold
ldconfig -C /mnt/output/ld.so.cache
exec python /app/alphafold/run_alphafold.py "$@"
# %startscript
# cd /app/alphafold
# exec python /app/alphafold/run_alphafold.py "$@"
Hi @prehensilecode thank you for making this repo! I met an error that says
Do you know how to modify the definition file to make it works?