-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33b7074
commit f631bb7
Showing
4 changed files
with
244 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
# Worker microservice ORIGINAL CONTENT | ||
|
||
FROM ghcr.io/biosimulators/bio-check-base:latest | ||
|
||
|
||
# os deps | ||
RUN apt-get update && apt-get install -y libatlas-base-dev \ | ||
libhdf5-serial-dev \ | ||
swig \ | ||
libboost-all-dev \ | ||
git \ | ||
meson \ | ||
build-essential \ | ||
g++ \ | ||
gfortran \ | ||
libblas-dev \ | ||
liblapack-dev \ | ||
gcc \ | ||
gfortran \ | ||
libgfortran5 | ||
|
||
|
||
# PySCeS | ||
|
||
# SUNDIALS --> installation path is default cmake (/usr/local) with LD_LIBRARY_PATH as runtime location | ||
# ignore certificate checking because certificate was expired as of 2021-11-10 | ||
ARG SUNDIALS_VERSION=2.6.2 | ||
RUN apt-get install -y --no-install-recommends \ | ||
wget \ | ||
cmake \ | ||
make \ | ||
g++ \ | ||
\ | ||
&& cd /tmp \ | ||
&& wget --no-check-certificate https://computing.llnl.gov/sites/default/files/inline-files/sundials-${SUNDIALS_VERSION}.tar.gz \ | ||
&& tar xvvf sundials-${SUNDIALS_VERSION}.tar.gz \ | ||
&& cd sundials-${SUNDIALS_VERSION} \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& CFLAGS="-fPIC" cmake .. \ | ||
&& make \ | ||
&& make install \ | ||
\ | ||
&& cd /tmp \ | ||
&& rm sundials-${SUNDIALS_VERSION}.tar.gz \ | ||
&& rm -r sundials-${SUNDIALS_VERSION} | ||
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
|
||
############################################ | ||
# App content | ||
|
||
COPY . /app/worker | ||
|
||
|
||
ENV PATH="/root/.local/bin:$PATH" | ||
ENV TEST_SBML_FP="test_fixtures/Elowitz-Nature-2000-Repressilator/BIOMD0000000012_url.xml" | ||
ENV TEST_OMEX_FP="test_fixtures/Elowitz-Nature-2000-Repressilator.omex" | ||
|
||
|
||
# copy pysces config | ||
RUN mkdir -p /Pysces \ | ||
&& mkdir -p /Pysces/psc \ | ||
&& mkdir -p /root/Pysces \ | ||
&& mkdir -p /root/Pysces/psc \ | ||
&& chmod ugo+rw -R /Pysces | ||
|
||
COPY ./.pys_usercfg.ini /Pysces/.pys_usercfg.ini | ||
COPY ./.pys_usercfg.ini /root/Pysces/.pys_usercfg.ini | ||
|
||
|
||
# Install only worker deps TODO: include toml in base deps | ||
RUN poetry install --only=worker,pysces --no-cache | ||
|
||
|
||
# Install Assimulo from source for Pysces | ||
# RUN apt-get update \ | ||
# && apt-get install -y libblas-dev \ | ||
# liblapack-dev \ | ||
# libatlas-base-dev \ | ||
# python3-distutils \ | ||
# python3-dev \ | ||
# && git clone https://github.com/modelon-community/Assimulo.git \ | ||
# && cd Assimulo \ | ||
# && poetry run pip install --upgrade setuptools pip wheel Cython numpy \ | ||
# && poetry run python3 setup.py install --sundials-home=/usr/local --blas-home=/usr/lib/x86_64-linux-gnu | ||
|
||
|
||
# install masspy TODO: implement this | ||
# RUN apt-get install -y --no-install-recommends \ | ||
# git \ | ||
# gcc \ | ||
# build-essential \ | ||
# libfreetype6-dev \ | ||
# libfreetype6 \ | ||
# pkg-config \ | ||
# \ | ||
# && mkdir -p /.cache/cobrapy | ||
# RUN git clone https://github.com/biosimulators/Biosimulators_MASSpy.git \ | ||
# && cd Biosimulators_MASSpy \ | ||
# && rm pyproject.toml | ||
|
||
|
||
WORKDIR /app/worker | ||
|
||
|
||
RUN python3 -c "import os;files=os.listdir();import shutil;[shutil.rmtree(f) if '__pycache__' in f else None for f in files]" | ||
|
||
|
||
ENTRYPOINT ["poetry", "run", "python3", "main.py"] | ||
|
||
|
||
############################# | ||
# Fenics | ||
|
||
# TODO: start the fenics implementation | ||
# RUN apt-get update && apt-get install -y petsc-dev \ | ||
# libopenmpi-dev \ | ||
# libspdlog-dev \ | ||
# libpugixml-dev \ | ||
# cmake \ | ||
# gcc \ | ||
# g++ \ | ||
# gfortran \ | ||
# && rm -rf /var/lib/apt/lists/* \ | ||
# && add-apt-repository ppa:fenics-packages/fenics -y \ | ||
# && apt update \ | ||
# && apt install -y fenicsx \ | ||
# && poetry run pip install meson-python meson ninja | ||
|
||
# RUN poetry run pip install \ | ||
# biosimulators-utils[logging] \ | ||
# biosimulators-amici \ | ||
# biosimulators-copasi \ | ||
# biosimulators-pysces \ | ||
# biosimulators-tellurium | ||
|
||
# add deps with extras | ||
# RUN yes | poetry cache clear PyPI --all \ | ||
# && poetry add biosimulators-utils --extras=logging \ | ||
# && poetry add pysces --extras=sbml \ | ||
# && poetry add biosimulators-copasi --python="^3.10" | ||
|
||
# install requirements in poetry via pip prox | ||
# RUN poetry run pip install -r /app/worker/requirements.worker.txt | ||
|
||
# install masspy TODO: do this | ||
# RUN poetry run pip install biosimulators-masspy | ||
|
||
# install with poetry TODO: remove this eventually | ||
# RUN /app/assets/install_deps.sh /app/worker/requirements.worker.txt |
Oops, something went wrong.