google-deepmind / alphafold

Open source code for AlphaFold 2.
Apache License 2.0
12.92k stars 2.29k forks source link

Failed to build docker on cuda:11.0.3-base #1038

Open hyeonLIB opened 3 weeks ago

hyeonLIB commented 3 weeks ago

Thank you for the great work and repository. I have an issue to build alphafold docker.

The nvidia/cuda:11.0-base is not available so I've executed the docker run command instead.

docker run --rm --gpus all nvidia/cuda:11.0.3-base nvidia-smi

It seemed okay, so I tried to build the alphafold docker and I got error bellow.

=> [ 1/12] FROM docker.io/nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu20.04 45.5s => [ 2/12] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt 38.7s => [ 3/12] RUN git clone --branch v3.3.0 https://github.com/soedinglab/ 48.7s => [ 4/12] RUN wget -q -P /tmp https://repo.anaconda.com/miniconda/Mi 11.2s => ERROR [ 5/12] RUN conda install -qy conda==24.1.2 pip python=3.11 65.2s

Thank you for your effort.

.
.
.

11.98   libglib            pkgs/main/linux-64::libglib-2.78.4-hdc74915_0 
11.98   libiconv           pkgs/main/linux-64::libiconv-1.16-h5eee18b_3 
11.98   libnpp             nvidia/linux-64::libnpp-12.3.1.54-0 
11.98   libnpp-dev         nvidia/linux-64::libnpp-dev-12.3.1.54-0 
11.98   libnvfatbin        nvidia/linux-64::libnvfatbin-12.6.77-0 
11.98   libnvfatbin-dev    nvidia/linux-64::libnvfatbin-dev-12.6.77-0 
11.98   libnvjitlink       nvidia/linux-64::libnvjitlink-12.6.77-0 
11.98   libnvjitlink-dev   nvidia/linux-64::libnvjitlink-dev-12.6.77-0 
11.98   libnvjpeg          nvidia/linux-64::libnvjpeg-12.3.3.54-0 
11.98   libnvjpeg-dev      nvidia/linux-64::libnvjpeg-dev-12.3.3.54-0 
11.98   libpng             pkgs/main/linux-64::libpng-1.6.39-h5eee18b_0 
11.98   libstdcxx-devel_l~ pkgs/main/linux-64::libstdcxx-devel_linux-64-11.2.0-h1234567_1 
11.98   libxcb             pkgs/main/linux-64::libxcb-1.15-h7f8727e_0 
11.98   libxkbcommon       pkgs/main/linux-64::libxkbcommon-1.0.1-h097e994_2 
11.98   nsight-compute     nvidia/linux-64::nsight-compute-2024.3.2.3-0 
11.98   nspr               pkgs/main/linux-64::nspr-4.35-h6a678d5_0 
11.98   nss                pkgs/main/linux-64::nss-3.89.1-h6a678d5_0 
11.98   sysroot_linux-64   pkgs/main/noarch::sysroot_linux-64-2.17-h57e8cba_10 
11.98 
11.98 The following packages will be UPDATED:
11.98 
11.98   conda                              24.1.2-py311h06a4308_0 --> 24.9.2-py311h06a4308_0 
11.98 
45.72 
45.72 
45.72 Downloading and Extracting Packages: ...working... done
45.72 Preparing transaction: ...working... done
46.02 Verifying transaction: ...working... done
46.89 Executing transaction: ...working... done
48.79 Channels:
48.79  - conda-forge
48.79  - defaults
48.79  - nvidia
48.79 Platform: linux-64
48.79 Collecting package metadata (repodata.json): ...working... done
59.86 Solving environment: ...working... failed
59.95 
59.95 InvalidSpec: The package "nvidia/linux-64::cuda-compiler==12.6.2=0" is not available for the specified platform
59.95 

------
Dockerfile:57
--------------------
  56 |     ENV LD_LIBRARY_PATH="/opt/conda/lib:$LD_LIBRARY_PATH"
  57 | >>> RUN conda install -qy conda==24.1.2 pip python=3.11 \
  58 | >>>     && conda install -y -c nvidia cuda=${CUDA_VERSION} \
  59 | >>>     && conda install -y -c conda-forge openmm=8.0.0 pdbfixer \
  60 | >>>     && conda clean --all --force-pkgs-dirs --yes
  61 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c conda install -qy conda==24.1.2 pip python=3.11     && conda install -y -c nvidia cuda=${CUDA_VERSION}     && conda install -y -c conda-forge openmm=8.0.0 pdbfixer     && conda clean --all --force-pkgs-dirs --yes" did not complete successfully: exit code: 1
miqueleg commented 1 week ago

I had a similar problem, where conda tried to install a newer version of cuda-runtime compared to the one asking for. I solved by modifying the file docker/Dockerfile like this:

FROM:

ENV PATH="/opt/conda/bin:$PATH"
ENV LD_LIBRARY_PATH="/opt/conda/lib:$LD_LIBRARY_PATH"
RUN conda install -qy conda==24.1.2 pip python=3.11 \
    && conda install -y -c nvidia cuda=${CUDA_VERSION}  \
    && conda install -y -c conda-forge openmm=8.0.0 pdbfixer \
    && conda clean --all --force-pkgs-dirs --yes

TO:

# Install conda packages.
ENV PATH="/opt/conda/bin:$PATH"
ENV LD_LIBRARY_PATH="/opt/conda/lib:$LD_LIBRARY_PATH"
RUN conda install -qy conda==24.1.2 pip python=3.11 \
    && conda install -y -c nvidia/label/cuda-${CUDA_VERSION} cuda \
    && conda install -y -c conda-forge openmm=8.0.0 pdbfixer \
    && conda clean --all --force-pkgs-dirs --yes

I hope this works for you too