Skip to content

Commit c8169af

Browse files
Add biosimulators compatible docker image
1 parent 212b9c1 commit c8169af

31 files changed

+2388
-1211
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish simulator to GHCR and BioSimulators
2+
on:
3+
release:
4+
types: [published, edited]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
# Checkout out
11+
- uses: actions/checkout@v2
12+
# Build and push Docker image
13+
14+
- name: Build and Push Image
15+
uses: whoan/docker-build-with-cache-action@v5
16+
with:
17+
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
18+
password: ${{ secrets.GITHUB_TOKEN }}
19+
image_name: vcell/biosimulators_vcell
20+
image_tag: ${{ github.event.release.tag_name }}
21+
build_extra_args: --build-arg SIMULATOR_VERSION=${{ github.event.release.tag_name }}
22+
push_git_tag: false
23+
registry: ghcr.io
24+
context: .
25+
dockerfile: Dockerfile
26+
27+
# Setup python dependencies
28+
- uses: actions/setup-python@v2
29+
with:
30+
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
31+
32+
- uses: BSFishy/pip-action@v1
33+
with:
34+
packages: |
35+
fire
36+
semver
37+
38+
- id: tagLatest
39+
run: echo ::set-output name=tagLatest::$(python tagLatest.py ${{steps.version.outputs.current}} ${{ github.event.release.tag_name }} )
40+
41+
- name: Tag the docker image with the latest tag
42+
if: ${{steps.tagLatest.outputs.tagLatest=='True'}}
43+
run: |
44+
docker tag ghcr.io/virtualcell/biosimulators_vcell::${{ github.event.release.tag_name }} ghcr.io/virtualcell/biosimulators_vcell:latest
45+
docker push --all-tags ghcr.io/virtualcell/biosimulators_vcell
46+
47+
# Submit to BioSimulators registry
48+
- name: Submit to BioSimulators registry
49+
run: |
50+
REVISION=$(git rev-parse HEAD)
51+
curl \
52+
-X POST \
53+
-u $${{ secrets.DOCKER_REGISTRY_USERNAME }}:$${{ secrets.DOCKER_REGISTRY_TOKEN }} \
54+
-H "Accept: application/vnd.github.v3+json" \
55+
https://api.github.com/repos/biosimulators/Biosimulators/issues \
56+
-d "{\"labels\": [\"Validate/submit simulator\"], \"title\": \"Submit VCell ${{ github.event.release.tag_name}}\", \"body\": \"---\nid: vcell\nversion: ${{ github.event.release.tag_name }}\nspecificationsUrl: https://raw.githubusercontent.com/${{ github.repository }}/${REVISION}/biosimulators.json\nspecificationsPatch:\n version: ${{ github.event.release.tag_name }}\n image:\n url: ghcr.io/biosimulators/biosimulators_vcell/vcell:${{ github.event.release.tag_name }}\nvalidateImage: true\ncommitSimulator: true\n\n---\"}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,4 @@ run_sim.sh
207207

208208
remove_temp.sh
209209

210+
vcell-client/UserDocumentation/originalXML/helpSearchConfig.txt

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

Dockerfile

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM maven:3.5-jdk-8-alpine as build
2+
COPY . /app/
3+
WORKDIR /app
4+
RUN mvn clean install -DskipTests -Dmaven.test.skip=true --quiet dependency:copy-dependencies
5+
6+
7+
# Base OS
8+
FROM ubuntu:latest
9+
10+
ARG SIMULATOR_VERSION="7.4.0.10"
11+
12+
# metadata
13+
LABEL \
14+
org.opencontainers.image.title="VCell" \
15+
org.opencontainers.image.version="${SIMULATOR_VERSION}" \
16+
org.opencontainers.image.description="Open-source software package for modeling cell biological systems that is built on a central database and disseminated as a standalone application." \
17+
org.opencontainers.image.url="http://vcell.org/" \
18+
org.opencontainers.image.documentation="https://vcell.org/support" \
19+
org.opencontainers.image.source="https://github.com/virtualcell/vcell" \
20+
org.opencontainers.image.authors="BioSimulators Team <[email protected]>" \
21+
org.opencontainers.image.vendor="BioSimulators Team" \
22+
org.opencontainers.image.licenses="MIT" \
23+
base_image="ubuntu:latest" \
24+
version="${SIMULATOR_VERSION}" \
25+
software="Virtual Cell" \
26+
software.version="${SIMULATOR_VERSION}" \
27+
about.summary="Open-source software package for modeling cell biological systems that is built on a central database and disseminated as a standalone application." \
28+
about.home="http://vcell.org/" \
29+
about.documentation="https://vcell.org/support" \
30+
about.license_file="https://github.com/virtualcell/vcell/blob/master/license.txt" \
31+
about.license="SPDX:MIT" \
32+
about.tags="rule-based modeling,kinetic modeling,dynamical simulation,systems biology,BNGL,SED-ML,COMBINE,OMEX" \
33+
maintainer="BioSimulators Team <[email protected]>"
34+
35+
RUN apt-get -y update && \
36+
apt-get install -y --no-install-recommends curl openjdk-8-jre dnsutils && \
37+
apt-get install -y python3 && \
38+
apt install -y python3-pip && \
39+
mkdir -p /usr/local/app/vcell/lib && \
40+
mkdir -p /usr/local/app/vcell/simulation && \
41+
mkdir -p /usr/local/app/vcell/installDir && \
42+
mkdir -p /usr/local/app/vcell/installDir/python/vcell_cli_utils
43+
44+
# Add linux local solvers only
45+
ADD ./localsolvers /usr/local/app/vcell/installDir/localsolvers
46+
ADD ./nativelibs /usr/local/app/vcell/installDir/nativelibs
47+
COPY ./docker_run.sh /usr/local/app/vcell/installDir/
48+
49+
50+
# Declare supported environment variables
51+
ENV ALGORITHM_SUBSTITUTION_POLICY=SIMILAR_VARIABLES
52+
53+
# Install required python-packages
54+
COPY ./vcell-cli-utils/ /usr/local/app/vcell/installDir/python/vcell_cli_utils/
55+
RUN pip3 install -r /usr/local/app/vcell/installDir/python/vcell_cli_utils/requirements.txt
56+
RUN pip3 install /usr/local/app/vcell/installDir/python/vcell_cli_utils/
57+
58+
# Copy JAR files
59+
COPY --from=build /app/vcell-client/target/vcell-client-0.0.1-SNAPSHOT.jar \
60+
/app/vcell-client/target/maven-jars/*.jar \
61+
/app/vcell-core/target/vcell-core-0.0.1-SNAPSHOT.jar \
62+
/app/vcell-core/target/maven-jars/*.jar \
63+
/app/vcell-server/target/vcell-server-0.0.1-SNAPSHOT.jar \
64+
/app/vcell-server/target/maven-jars/*.jar \
65+
/app/vcell-vmicro/target/vcell-vmicro-0.0.1-SNAPSHOT.jar \
66+
/app/vcell-vmicro/target/maven-jars/*.jar \
67+
/app/vcell-oracle/target/vcell-oracle-0.0.1-SNAPSHOT.jar \
68+
/app/vcell-oracle/target/maven-jars/*.jar \
69+
/app/vcell-admin/target/vcell-admin-0.0.1-SNAPSHOT.jar \
70+
/app/vcell-admin/target/maven-jars/*.jar \
71+
/app/vcell-cli/target/vcell-cli-0.0.1-SNAPSHOT.jar \
72+
/app/vcell-cli/target/maven-jars/*.jar \
73+
/app/non-maven-java-libs/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar \
74+
/app/non-maven-java-libs/com/oracle/ucp/11.2.0.4/ucp-11.2.0.4.jar \
75+
/app/non-maven-java-libs/org/sbml/libcombine/libCombineLinux64/0.2.7/libCombineLinux64-0.2.7.jar \
76+
/usr/local/app/vcell/lib/
77+
RUN chmod -R 755 /usr/local/app/vcell && chmod +x /usr/local/app/vcell/installDir/docker_run.sh
78+
79+
# Entrypoint
80+
ENTRYPOINT ["/usr/local/app/vcell/installDir/docker_run.sh"]
81+
CMD []

Dockerfile-api_NOT_USED

Lines changed: 0 additions & 84 deletions
This file was deleted.

Dockerfile-batch_NOT_USED

Lines changed: 0 additions & 54 deletions
This file was deleted.

Dockerfile-clientgen_NOT_USED

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)