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

python: can't open file '/app/alphafold/run_alphafold.py': [Errno 13] Permission denied (related to Ubuntu update?) #677

Closed
sz-1002 opened this issue Jan 12, 2023 · 2 comments

Comments

@sz-1002
Copy link

sz-1002 commented Jan 12, 2023

Hi!

I encountered a new error running AlphaFold multimer 2.3.0 after re-building the Docker image (re-building because I was trying to see if changing versions of CUDA or jax could at least temporarily fix the CUDA_ERROR_ILLEGAL_ADDRESS error #667):

python: can't open file '/app/alphafold/run_alphafold.py': [Errno 13] Permission denied)

To me this looks like something wrong with the Docker image, but docker build -f docker/Dockerfile -t alphafold . gives no error (see below) (this is using the default Dockerfile).

The same commands worked fine before, and the only difference I can think of is I just updated the packages in Ubuntu (sudo apt update & upgrade). Do you think this is an issue with the package updates, or some other problem? OS is Ubuntu 20.04 LTS.

Thank you very much for your help!!


Output of docker build -f docker/Dockerfile -t alphafold .:

Sending build context to Docker daemon  34.93MB
Step 1/18 : ARG CUDA=11.1.1
Step 2/18 : FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04
 ---> cd358584cc21
Step 3/18 : ARG CUDA
 ---> Using cache
 ---> accb97b87cea
Step 4/18 : SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 ---> Using cache
 ---> 17f0f9efe7e5
Step 5/18 : RUN apt-get update     && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y         build-essential         cmake         cuda-command-line-tools-$(cut -f1,2 -d- <<< ${CUDA//./-})         git         hmmer         kalign         tzdata         wget     && rm -rf /var/lib/apt/lists/*     && apt-get autoremove -y     && apt-get clean
 ---> Using cache
 ---> 0864b73d6980
Step 6/18 : RUN git clone --branch v3.3.0 https://github.com/soedinglab/hh-suite.git /tmp/hh-suite     && mkdir /tmp/hh-suite/build     && pushd /tmp/hh-suite/build     && cmake -DCMAKE_INSTALL_PREFIX=/opt/hhsuite ..     && make -j 4 && make install     && ln -s /opt/hhsuite/bin/* /usr/bin     && popd     && rm -rf /tmp/hh-suite
 ---> Using cache
 ---> dc08894bbed5
Step 7/18 : RUN wget -q -P /tmp   https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh     && bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda     && rm /tmp/Miniconda3-latest-Linux-x86_64.sh
 ---> Using cache
 ---> 8d934078b34c
Step 8/18 : ENV PATH="/opt/conda/bin:$PATH"
 ---> Using cache
 ---> 78dda2de761b
Step 9/18 : RUN conda install -qy conda==4.13.0     && conda install -y -c conda-forge       openmm=7.5.1       cudatoolkit==${CUDA_VERSION}       pdbfixer       pip       python=3.8       && conda clean --all --force-pkgs-dirs --yes
 ---> Using cache
 ---> b386b78a8e38
Step 10/18 : COPY . /app/alphafold
 ---> Using cache
 ---> 51240e950dc8
Step 11/18 : RUN wget -q -P /app/alphafold/alphafold/common/   https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
 ---> Using cache
 ---> 6a7fea94a5d6
Step 12/18 : RUN 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
 ---> Using cache
 ---> a8d0e25f2fb8
Step 13/18 : WORKDIR /opt/conda/lib/python3.8/site-packages
 ---> Using cache
 ---> 0481fbf8e8ac
Step 14/18 : RUN patch -p0 < /app/alphafold/docker/openmm.patch
 ---> Using cache
 ---> a62a20fed700
Step 15/18 : RUN chmod u+s /sbin/ldconfig.real
 ---> Using cache
 ---> 1ec560583846
Step 16/18 : WORKDIR /app/alphafold
 ---> Using cache
 ---> 3eb0ad557f20
Step 17/18 : RUN echo $'#!/bin/bash\nldconfig\npython /app/alphafold/run_alphafold.py "$@"' > /app/run_alphafold.sh   && chmod +x /app/run_alphafold.sh
 ---> Using cache
 ---> 2575cdda7311
Step 18/18 : ENTRYPOINT ["/app/run_alphafold.sh"]
 ---> Using cache
 ---> 3c6b60454cad
Successfully built 3c6b60454cad
Successfully tagged alphafold:latest

(There were warnings about running pip as root, e.g. WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv)

@alexanderimanicowenrivers
Copy link
Collaborator

Does fixing permissions on the code help? sudo chmod 755 --recursive alphafold.

@sz-1002
Copy link
Author

sz-1002 commented Jan 13, 2023

@alexanderimanicowenrivers

Nope, still the same error.
But, downloading a fresh copy of AlphaFold2 (v2.3.1) fixed this problem somehow.

Thanks a lot!

@sz-1002 sz-1002 closed this as completed Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants