-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-base
62 lines (52 loc) · 2.72 KB
/
Dockerfile-base
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
57
58
59
60
61
62
# FROM ubuntu:22.04
FROM continuumio/miniconda3:main
LABEL org.opencontainers.image.title="bio-compose-server-base" \
org.opencontainers.image.description="Base Docker image for BioCompose REST API management, job processing, and datastorage with MongoDB, ensuring scalable and robust performance." \
org.opencontainers.image.url="https://biosimulators.org/" \
org.opencontainers.image.source="https://github.com/biosimulators/bio-check" \
org.opencontainers.image.authors="Alexander Patrie <apatrie@uchc.edu>, BioSimulators Team <info@biosimulators.org>" \
org.opencontainers.image.vendor="BioSimulators Team"
SHELL ["/usr/bin/env", "bash", "-c"]
# shared env
ENV DEBIAN_FRONTEND=noninteractive \
MONGO_URI="mongodb://mongodb/?retryWrites=true&w=majority&appName=bio-check" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
TEST_SBML_FP="test-fixtures/sbml-core/Elowitz-Nature-2000-Repressilator/BIOMD0000000012_url.xml" \
TEST_PSC_FP="/Pysces/psc/BIOMD0000000012_url.xml.psc" \
TEST_OMEX_FP="test-fixtures/sbml-core/Elowitz-Nature-2000-Repressilator.omex"
# copy docker
COPY assets/docker/config/.biosimulations.json /.google/.bio-check.json
COPY assets/docker/config/.pys_usercfg.ini /Pysces/.pys_usercfg.ini
COPY assets/docker/config/.pys_usercfg.ini /root/Pysces/.pys_usercfg.ini
COPY assets/docker/shared.py /app/shared.py
COPY assets/test-fixtures /app/test-fixtures
COPY assets/docker/config/environment.base.yml /app/environment.base.yml
# cd /app
WORKDIR /app
RUN mkdir -p /Pysces \
&& mkdir -p /Pysces/psc \
&& mkdir -p /root/Pysces \
&& mkdir -p /root/Pysces/psc \
&& mkdir config \
&& conda env create -n server -f environment.base.yml -y \
&& echo "conda activate server" >> ~/.bashrc \
&& source ~/.bashrc \
&& conda run -n server pip3 install --upgrade pip \
&& conda run -n server pip install --upgrade pip \
&& conda env export --no-builds -f config/environment.base.lock.yml \
&& rm -f environment.base.yml
# to run with a local network:
# net=app-net
# docker network create "$net"
# docker run -d --rm --name "$lib" --net "$net" --platform linux/amd64 "$PKG_ROOT"-"$lib":latest
# docker run -it --name "$lib" --net "$net" --platform linux/amd64 "$PKG_ROOT"-"$lib"
# # create conda env from yml and ensure env activation
# RUN conda env create -f config/environment.base.yml -y \
# && rm -f config/environment.base.yml \
# && conda env export --no-builds > config/environment.lock.yml \
# && poetry lock
# create lockfile conda analogy: conda env export --no-builds > environment.lock.yml
# && conda create -n conda-env python=3.10 -y \
# && poetry install --without=api,worker,composition \
# && poetry config virtualenvs.in-project true \