Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
modelcif-converters
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
modelcif-converters
Commits
5646680c
Commit
5646680c
authored
2 years ago
by
B13nch3n
Browse files
Options
Downloads
Patches
Plain Diff
Adapt to new way of providing the ModelCIF dict
parent
147294b3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
validation/Dockerfile
+24
-28
24 additions, 28 deletions
validation/Dockerfile
with
24 additions
and
28 deletions
validation/Dockerfile
+
24
−
28
View file @
5646680c
ARG
VERSION_PYTHON="3.
6.15
"
ARG
VERSION_BASE_IMAGE="python:${VERSION_PYTHON}-alpine3.1
5
"
ARG
VERSION_PYTHON="3.
7
"
ARG
VERSION_BASE_IMAGE="python:${VERSION_PYTHON}-alpine3.1
6
"
FROM
${VERSION_BASE_IMAGE}
# We need to declare ARGs again which were declared before the build stage
# (FROM directive), otherwise they won't be available in this stage.
...
...
@@ -62,39 +62,32 @@ RUN set -e pipefail; \
extra-cmake-modules tcsh; \
apk add libstdc++
## Add a dedicated user for mmCIF file validation
## MMCIF_USER_ID can be used to avoid file permission issues in development.
ARG
MMCIF_USER_ID=501
RUN
adduser
-S
-u
${
MMCIF_USER_ID
}
mmcif-vldtr
## Copy tools
(already in use during dictionary SDB creation)
## Copy tools
/ entrypoint script
COPY
--chmod=755 get-mmcif-dict-versions.py \
/usr/local/bin/get-mmcif-dict-versions
COPY
--chmod=755 entrypoint.sh /
COPY
--chmod=755 validate-mmcif-file.py /usr/local/bin/validate-mmcif-file
## Create dictionaries for validating mmCIF files. To rebuild dictionaries,
## rebuild the container with build argument DICT_FETCH_DATE="<DATA>.n" so
## only the RUN Command for building the dictionary is triggered. The ".n"
## should be an increasing number to enable simple multiple builds in one
## day, in case something goes wrong.
## Create dictionaries for validating mmCIF files.
## The version to be created is controlled by build argument USE_DICT_VERSION.
## Use a versions vailable at
## https://github.com/ihmwg/ModelCIF/tree/master/archive or the special word
## "latest", that will use
## https://github.com/ihmwg/ModelCIF/blob/master/dist/mmcif_ma.dic.
## Dictionaries do not change that frequently therefore we skip the hassle of
## keeping them in an external volume.
ARG
DICT_FETCH_DATE="2022-05-16.1"
# ToDo: use commit instead of USE_DICT_RELEASE
ARG
USE_DICT_RELEASE="master"
ENV
DICT_FETCH_DATE=${DICT_FETCH_DATE}
ENV
USE_DICT_RELEASE=${USE_DICT_RELEASE}
LABEL
org.modelarchive.dict-fetch-date="${DICT_FETCH_DATE}"
LABEL
org.modelarchive.dict_release="${USE_DICT_RELEASE}"
ARG
USE_DICT_VERSION="1.4.1"
ENV
USE_DICT_VERSION=${USE_DICT_VERSION}
LABEL
org.modelarchive.dict_release="${USE_DICT_VERSION}"
WORKDIR
${SRC_DIR}
RUN
set
-e
pipefail
;
\
apk add curl
;
\
export
_DICT_DIR
=
"
${
SRC_DIR
}
/mmcif_dicts"
;
\
export
_DICT_URL
=
"https://mmcif.wwpdb.org/dictionaries/ascii"
;
\
export
_PATHSPEC
=
"557bda7"
;
\
export
_REPO_URL
=
"https://raw.githubusercontent.com/ihmwg/ModelCIF/
${
_PATHSPEC
}
"
;
\
export
_MA_DICT_URL
=
"
${
_REPO_URL
}
/dist/mmcif_ma.dic"
;
\
export
_DICT_REPO
=
"ModelCIF.git"
;
\
export
_GIT_URL
=
"https://raw.github.com/ihmwg/ModelCIF/master"
;
\
export
_MA_DICT_URL
=
"
${
_GIT_URL
}
/archive/mmcif_ma-v
${
USE_DICT_VERSION
}
.dic"
;
\
mkdir
${
_DICT_DIR
}
;
\
mkdir
${
MMCIF_DICTS_DIR
}
;
\
cd
${
_DICT_DIR
}
;
\
...
...
@@ -104,8 +97,9 @@ RUN set -e pipefail; \
gunzip *.gz; \
#
## Fetch the merged ModelCIF dictionary
#
## Fetch the Git repo with the dictionaries
if test x${USE_DICT_VERSION}==xlatest; then \
export _MA_DICT_URL="${_GIT_URL}/dist/mmcif_ma.dic"; \
fi; \
curl ${_MA_DICT_URL} -s -L -o mmcif_ma.dic; \
#
## Build the ModelCIF SDB
...
...
@@ -137,15 +131,17 @@ RUN set -e pipefail; \
apk del curl
COPY
--chmod=755 entrypoint.sh /
COPY
--chmod=755 validate-mmcif-file.py /usr/local/bin/validate-mmcif-file
# for development
#RUN set -e pipefail; \
# apk add bash emacs gcc build-base; \
# /usr/local/bin/python -m pip install pylint black; \
# apk del gcc build-base
## Add a dedicated user for mmCIF file validation
## MMCIF_USER_ID can be used to avoid file permission issues in development.
ARG
MMCIF_USER_ID=501
RUN
adduser
-S
-u
${
MMCIF_USER_ID
}
mmcif-vldtr
USER
mmcif-vldtr
ENTRYPOINT
["/entrypoint.sh"]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment