diff --git a/projects/docker/Dockerfile b/projects/docker/Dockerfile deleted file mode 100644 index cc3c2b143c81f29db6f7d553968cab0831b90f33..0000000000000000000000000000000000000000 --- a/projects/docker/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -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 org.openstructure.translate2modelcif="2022-04-08.1" -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; \ - # for development, install venv - apt-get install -y git pip python3.8-venv; \ - pip install -r requirements.txt; \ - # for development, install black & PyLint - pip install black pylint; \ - git clone https://github.com/ihmwg/python-ihm.git ihm.git; \ - cd ihm.git; \ - python3 setup.py build; \ - python3 setup.py install; \ - rm -rf ${SRC_DIR}/ihm.git; \ - cd ${SRC_DIR}; \ - git clone https://github.com/ihmwg/python-modelcif.git modelcif.git; \ - cd modelcif.git; \ - python3 setup.py build; \ - python3 setup.py install; \ - 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=projects/pointmutations-haddock/convert2modelcif.py -COPY --chmod=755 $CONVERTERSCRIPT /usr/local/bin/convert2modelcif - -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 diff --git a/projects/docker/README.md b/projects/docker/README.md deleted file mode 100644 index 2cca2945163c81123f87dce956e6ef28c588d505..0000000000000000000000000000000000000000 --- a/projects/docker/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Docker container (base) for the converter software - -This directory contains all the files needed to create the base Docker image used for the converter software in [projects](projects/). - -<!-- -build: -- go to repo root -- execute: docker build -f docker/Dockerfile -t mmcifconverter:20220427 - -run interactive shell for development: -- make sure files exist: /Users/stefan/Projects/ma-converters.git/projects/pointmutations-haddock/.docker-bash-history -- execute: -docker run --rm -i -v /Users/stefan/.bash_profile:/home/mmcif/.bash_profile -v /Users/stefan/.bash_aliases:/home/mmcif/.bash_aliases -v /Users/stefan/.bashrc:/home/mmcif/.bashrc -v /Users/stefan/Projects/ma-converters.git/projects/pointmutations-haddock/.docker-bash-history:/home/mmcif/.bash_history -v /Users/stefan/Projects/ma-converters.git/:/develop -t mmcifconverter:20220427 bash - - --> diff --git a/projects/docker/entrypoint.sh b/projects/docker/entrypoint.sh deleted file mode 100644 index 20874f8b156d3b6b168a2fb40d7ec8a13a7ac4a8..0000000000000000000000000000000000000000 --- a/projects/docker/entrypoint.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -## (We use sh since Alpine does not have Bash by default) - - -## exit immediately on commands with a non-zero exit status. -set -euo pipefail - -## When started without any arguments, "-h", "--help", "-help" or "help", print -## usage. -if [ $# -eq 0 ] || [ x$1 == x"-h" ] || [ x$1 == x"--help" ] || - [ x$1 == x"-help" ] || [ x$1 == x"help" ]; then - echo " ModelCIF file converter" - echo "----------------------------------------" - echo "Provided by SWISS-MODEL / Schwede group" - echo "(swissmodel.expasy.org / schwedelab.org)" - echo "" - /usr/local/bin/convert2modelcif --help - exit 1 -fi -if [ x$1 == x"convert2modelcif" ] || [ x$1 == x"2cif" ]; then - shift - # take over the process, make translate2modelcif run on PID 1 - exec /usr/local/bin/convert2modelcif $@ - exit $? -fi - -exec "$@" - -# LocalWords: euo pipefail eq Schwede schwedelab mmcif fi diff --git a/projects/docker/requirements.txt b/projects/docker/requirements.txt deleted file mode 100644 index 2abd7d3a956e774cb5b3d3765de5e9b9d66f2d96..0000000000000000000000000000000000000000 --- a/projects/docker/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -requests -ujson