Skip to content

Commit

Permalink
Hack is no longer needed, fixed in cctbx/cctbx_project#937
Browse files Browse the repository at this point in the history
  • Loading branch information
aozalevsky committed Dec 22, 2023
1 parent 24bc1bf commit a311301
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
FROM centos:7
MAINTAINER Ben Webb <[email protected]>
FROM ubuntu:22.04
MAINTAINER Arthur Zalevsky <[email protected]>

# Install ATSAS and its dependencies
COPY ATSAS-3.0.5-2.el7.x86_64.rpm /
RUN yum -y localinstall /ATSAS-3.0.5-2.el7.x86_64.rpm && yum -y install libgfortran5 git && rm -f /ATSAS*.rpm
ARG ATSAS
ARG TZ=America/Los_Angeles
ENV TZ=${TZ}
ENV DEBIAN_FRONTEND=noninteractive

# Set up basic conda environment using conda-forge packages
RUN curl -L https://github.com/conda-forge/miniforge/releases/download/4.11.0-0/Miniforge3-4.11.0-0-Linux-x86_64.sh -o miniforge.sh && echo "4c24b38969ac413efa3a984290296f72578340d06004f2c7ba5efcbf828ec86b miniforge.sh" sha256sum -c --status && bash ./miniforge.sh -b -p /root/miniforge && rm -f miniforge.sh && /root/miniforge/bin/conda init -q bash
# Install common dependencies
RUN apt-get update -y && apt-get install -y curl git subversion build-essential

# Install Python packages needed by IHMValidation and install extra RPMs
# needed to run firefox
RUN source /root/.bashrc && eval "$(conda shell.bash hook)" && conda install -y pandas flask ihm scikit-learn selenium bokeh requests firefox geckodriver && pip install python-decouple pdfkit && yum -y install gtk3 alsa-lib
# Set up basic conda environment using conda-forge packages
RUN curl -L https://github.com/conda-forge/miniforge/releases/download/23.3.1-1/Mambaforge-23.3.1-1-Linux-x86_64.sh -o miniforge.sh && echo "dbe92c011a1315b9626e2f93a165892f4b89177145bc350b3859a483a3642a24 miniforge.sh" sha256sum -c --status && bash ./miniforge.sh -b -p /opt/conda && rm -f miniforge.sh && /opt/conda/bin/conda init -q bash

# Get wkhtmltopdf directly from web site (there is a conda package, but it
# does not handle https: links)
RUN curl -LO https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm && yum -y localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm && rm -f wkhtmltox-0.12.6-1.centos7.x86_64.rpm
# Ensure that we always use a shell with conda
ENV PATH /opt/conda/bin:${PATH}
RUN echo "conda activate" >> ~/.bashrc
SHELL ["/bin/bash", "--login", "-c"]

# Build molprobity from source code and put the binaries we need in /usr/bin/
RUN source /root/.bashrc && eval "$(conda shell.bash hook)" && yum -y install mesa-libGL-devel subversion ca-certificates git gcc-c++ && mkdir molprobity && cd molprobity && curl -O https://raw.githubusercontent.com/rlabduke/MolProbity/master/install_via_bootstrap.sh && bash install_via_bootstrap.sh 12 && ln -sf /molprobity/build/bin/molprobity.clashscore /usr/bin/ && ln -sf /molprobity/build/bin/molprobity.ramalyze /usr/bin/ && ln -sf /molprobity/build/bin/molprobity.rotalyze /usr/bin/ && ln -sf /molprobity/build/bin/molprobity.molprobity /usr/bin/
ADD "https://api.github.com/repos/rlabduke/MolProbity/commits?per_page=1" latest_commit
RUN mkdir /opt/molprobity && cd /opt/molprobity && curl -O https://raw.githubusercontent.com/rlabduke/MolProbity/master/install_via_bootstrap.sh && bash ./install_via_bootstrap.sh 4
ENV PATH ${PATH}:/opt/molprobity/build/bin

# Install SAS tools: ATSAS and SASCIFTOOLS
COPY ${ATSAS} /.
RUN apt-get update -y && apt-get install -y /${ATSAS} && rm -f /${ATSAS}
RUN pip install git+https://git.embl.de/grp-svergun/sasciftools3.git@master#egg=sasciftools
# Install additional certificate for SASBDB
RUN curl https://cacerts.digicert.com/ThawteEVRSACAG2.crt.pem -o ThawteEVRSACAG2.crt --output-dir /usr/local/share/ca-certificates/ && update-ca-certificates
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# Install Python packages and other dependencies needed by IHMValidation
RUN apt-get update -y && apt-get install -y xvfb libasound2 libdbus-glib-1-2 libgtk-3-0 && mamba install -y pip requests numpy pandas scikit-learn matplotlib "bokeh<3.0" selenium pyvirtualdisplay firefox geckodriver jinja2 && pip install -U iqplot pdfkit ihm && curl -L -O https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb && apt install -y ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb && rm -rf wkhtmltox_0.12.6.1-2.jammy_amd64.deb
# Hardcode selenium path
ENV SE_MANAGER_PATH=/opt/conda/bin/selenium-manager

# Get IHMValidation
ADD "https://api.github.com/repos/salilab/IHMValidation/commits?per_page=1" latest_commit
RUN git clone --depth 1 https://github.com/salilab/IHMValidation.git /opt/IHMValidation

# Get IHMValidation and configure
RUN git clone https://github.com/salilab/IHMValidation.git && source /root/.bashrc && eval "$(conda shell.bash hook)" && yum -y install which && echo "ATSAS=\"`which datcmp`\"" > IHMValidation/.env && echo "Molprobity_ramalyze=\"`which molprobity.ramalyze`\"" >> IHMValidation/.env && echo "Molprobity_molprobity=\"`which molprobity.molprobity`\"" >> IHMValidation/.env && echo "Molprobity_clashscore=\"`which molprobity.clashscore`\"" >> IHMValidation/.env && echo "Molprobity_rotalyze=\"`which molprobity.rotalyze`\"" >> IHMValidation/.env && echo "wkhtmltopdf=\"`which wkhtmltopdf`\"" >> IHMValidation/.env
# Create input and output dirs
RUN mkdir -p /ihmv/input /ihmv/output /ihmv/cache /ihmv/databases

0 comments on commit a311301

Please sign in to comment.