Sign inSign up

francecosta/ccp4

By francecosta

•Updated about 3 years ago

Container to run ccp4 (Collaborative Computational Project No. 4)

Image
0

226

francecosta/ccp4 repository overview

Please note that the original software licenses still apply

This container allows calling hgen command throught python3 but with a caveut (see below):

Dockerfile

FROM pegi3s/ccp4

# make ccp4 scripts visible (useful only for running with Docker)
#RUN ./ccp4/BINARY.setup\
#   && echo "" >> .bashrc\
#   && echo ". /ccp4/bin/ccp4.setup-sh" >>  ~/.bashrc

# install python3.8
RUN apt-get update \
    && apt-get install -y build-essential checkinstall \
    && apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev \
       libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev \
    && cd opt \
    && wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz \
    && tar xzf Python-3.8.12.tgz \
    && cd Python-3.8.12 \
    && ./configure --enable-optimizations \
    && make altinstall \
    && cd ../ \
    && rm -f Python-3.8.12.tgz

# create symlink to run python3
RUN ln -sf /usr/local/bin/python3.8 /usr/bin/python3

WORKDIR /

Run with docker:

docker run --rm -it --entrypoint bash --platform linux/amd64 francecosta/ccp4:v0.0.5
source /ccp4/bin/ccp4.setup-sh
hgen

Despite having tried to explicit the "/ccp4/bin/ccp4.setup-sh" commands, hgen still does not run from singularity There is a workaround. Create a script "run_hgen.sh" as follows:

#! /bin/bash
source /ccp4/bin/ccp4.setup-sh
hgen "$@"

and run thw script from singularity

chmod +x hgen.sh
singularity pull ccp4.sif docker://francecosta/ccp4:v0.0.5
singularity run ccp4.sif  ./run_hgen.sh

or with python3:

singularity run ccp4.sif python3 -c "import os; os.system('./run_hgen.sh')"

Tag summary

Content type

Image

Digest

sha256:76139c335…

Size

4.3 GB

Last updated

about 3 years ago

docker pull francecosta/ccp4:v0.0.5