Presently, NEURON and PySCeS cannot be used together a single Python memory space, likely due to their shared dependency on SUNDIALS.
The Dockerfile below illustrates the problem. Building this results in a segmentation fault.
This conflict should be resolved. Unless then, the two can be used together, but only through a technique such as forked processes.
FROM python:3.9-slim-buster
RUN apt-get update -y
# install PySCeS
RUN apt-get install -y --no-install-recommends \
wget \
cmake \
make \
g++ \
gfortran \
liblas-dev \
liblapack-dev \
git \
gcc \
libgfortran5
ARG SUNDIALS_VERSION=2.6.2
RUN cd /tmp \
&& wget 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 \
&& cmake \
-D BUILD_SHARED_LIBS=ON \
-D BUILD_STATIC_LIBS=OFF \
CFLAGS="-fPIC" \
.. \
&& make \
&& make install
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ARG ASSIMULO_VERSION=3.2.5
RUN pip install cython numpy scipy matplotlib \
&& pip install git+https://github.com/modelon-community/Assimulo.git@Assimulo-${ASSIMULO_VERSION}
ARG PYSCES_REVISION=b0eefe42d03e8551de9fa2a6d31bf246f8255c8b
RUN pip install git+https://github.com/PySCeS/pysces.git@${PYSCES_REVISION}
# Install requirements for NEURON
RUN apt-get install -y default-jre
# Install BioSimulators packages
RUN pip install biosimulators_pysces biosimulators_pyneuroml[neuron]
# Download examples COMBINE archives
RUN mkdir /root/test \
&& cd /root/test \
&& wget https://github.com/biosimulators/Biosimulators_test_suite/raw/dev/examples/sbml-core/Ciliberto-J-Cell-Biol-2003-morphogenesis-checkpoint-continuous.omex \
&& wget https://github.com/biosimulators/Biosimulators_test_suite/raw/dev/examples/neuroml-lems/Hodgkin-Huxley-cell-CVODE.omex
RUN cd /root/test \
&& python -c "import biosimulators_pyneuroml.api.neuron; biosimulators_pyneuroml.api.neuron.exec_sedml_docs_in_combine_archive('/Hodgkin-Huxley-cell-CVODE.omex', 'out2'); import biosimulators_pysces; biosimulators_pysces.exec_sedml_docs_in_combine_archive('Ciliberto-J-Cell-Biol-2003-morphogenesis-checkpoint-continuous.omex', 'out')"
Presently, NEURON and PySCeS cannot be used together a single Python memory space, likely due to their shared dependency on SUNDIALS.
The Dockerfile below illustrates the problem. Building this results in a segmentation fault.
This conflict should be resolved. Unless then, the two can be used together, but only through a technique such as forked processes.