-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-base
50 lines (41 loc) · 2.08 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
# FROM ubuntu:22.04
FROM continuumio/miniconda3:latest
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 <[email protected]>, BioSimulators Team <[email protected]>" \
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
# 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 assets/test_fixtures /app/
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 env export --no-builds -f config/environment.base.lock.yml \
&& rm -f environment.base.yml
# # 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 \