Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ARG VERSION_OST="2.3.0"
FROM registry.scicore.unibas.ch/schwede/openstructure:${VERSION_OST}
## We need to declare ARGs again which were declared before the build stage
## (FROM directive), otherwise they won't be available in this stage.
ARG VERSION_OST
## Set up environment
ENV SRC_DIR="/tmp" \
VERSION_OST=${VERSION_OST} \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
LABEL org.openstructure.base-image="${VERSION_OST}"
LABEL maintainer="Stefan Bienert <stefan.bienert@unibas.ch>"
LABEL vendor1="Schwede Group (schwedelab.org)"
LABEL vendor2="SIB - Swiss Institute of Bioinformatics (sib.swiss)"
LABEL vendor3="Biozentrum - University of Basel (biozentrum.unibas.ch)"
## Install python-modelcif and python-ihm
COPY docker/requirements.txt ${SRC_DIR}
WORKDIR ${SRC_DIR}
RUN set -e pipefail; \
apt-get update -y; \
apt-get install -y git pip; \
pip install -r requirements.txt; \
## use the python-ihm latest
git clone https://github.com/ihmwg/python-ihm.git ihm.git; \
cd ihm.git; \
python3 setup.py build; \
python3 setup.py install; \
cd ${SRC_DIR}; \
rm -rf ${SRC_DIR}/ihm.git; \
## use python-modelcif latest
git clone https://github.com/ihmwg/python-modelcif.git modelcif.git; \
cd modelcif.git; \
python3 setup.py build; \
python3 setup.py install; \
cd ${SRC_DIR}; \
rm -rf ${SRC_DIR}/modelcif.git; \
rm -rf /var/lib/apt/lists/*; \
apt-get purge -y --auto-remove git pip gcc
## Add a dedicated user
## MMCIF_USER_ID can be used to avoid file permission issues.
ARG MMCIF_USER_ID=501
RUN adduser --system -u ${MMCIF_USER_ID} mmcif
COPY --chmod=755 docker/entrypoint.sh /
## Copy tool(s)
ARG CONVERTERSCRIPT=CoFFE-sponge-proteins/translate2modelcif.py
ARG CONVERTERCMD=convert2modelcif
ENV CONVERTERCMD=$CONVERTERCMD
COPY --chmod=755 $CONVERTERSCRIPT /usr/local/bin/$CONVERTERCMD
## Add development setup
ARG ADD_DEV
RUN set -e pipefail; \
if test xYES = x`echo ${ADD_DEV} | tr '[:lower:]' '[:upper:]'`; then \
apt-get update -y; \
pip install pylint black; \
apt-get purge -y --auto-remove pip; \
fi
USER mmcif
ENTRYPOINT ["/entrypoint.sh"]
# LocalWords: ARG OST ARGs ENV SRC tmp PYTHONUNBUFFERED Schwede schwedelab py
# LocalWords: PYTHONDONTWRITEBYTECODE Bioinformatics sib swiss Biozentrum ihm
# LocalWords: modelcif txt WORKDIR pipefail chmod adduser mmcif ENTRYPOINT cd
# LocalWords: pylint rf entrypoint gcc CONVERTERSCRIPT CoFFE DEV xYES emacs
# LocalWords: fi