Commit 54c73580 authored by Hamish Tomlinson's avatar Hamish Tomlinson Committed by Copybara-Service
Browse files

Reduce size of docker image by cleaning apt, conda and pip caches

PiperOrigin-RevId: 474805792
Change-Id: I103efb2884b056ddb397b424fce8488b04f00348
parent 5e702ce1
......@@ -19,9 +19,10 @@ FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04
ARG CUDA
# Use bash to support string substitution.
SHELL ["/bin/bash", "-c"]
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
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//./-}) \
......@@ -30,7 +31,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
kalign \
tzdata \
wget \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& apt-get autoremove -y \
&& apt-get clean
# Compile HHsuite from source.
RUN git clone --branch v3.3.0 https://github.com/soedinglab/hh-suite.git /tmp/hh-suite \
......@@ -56,16 +59,17 @@ RUN conda install -qy conda==4.13.0 \
cudatoolkit==${CUDA_VERSION} \
pdbfixer \
pip \
python=3.7
python=3.7 \
&& conda clean --all --force-pkgs-dirs --yes
COPY . /app/alphafold
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
# Install pip packages.
RUN pip3 install --upgrade pip \
&& pip3 install -r /app/alphafold/requirements.txt \
&& pip3 install --upgrade \
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.17 \
jaxlib==0.3.15+cuda11.cudnn805 \
-f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment