# Base OS
FROM ghcr.io/biosimulators/biosimulators_pyneuroml/neuron:latest

ARG VERSION=0.0.11
ARG SIMULATOR_VERSION="1.0.0.2"

# metadata
LABEL \
    org.opencontainers.image.title="NetPyNe" \
    org.opencontainers.image.version="${SIMULATOR_VERSION}" \
    org.opencontainers.image.description="Python package to facilitate the development, simulation, parallelization, analysis, and optimization of biological neuronal networks using the NEURON simulator" \
    org.opencontainers.image.url="http://www.netpyne.org/" \
    org.opencontainers.image.documentation="http://www.netpyne.org/" \
    org.opencontainers.image.source="https://github.com/biosimulators/Biosimulators_pyNeuroML" \
    org.opencontainers.image.authors="BioSimulators Team <info@biosimulators.org>" \
    org.opencontainers.image.vendor="BioSimulators Team" \
    org.opencontainers.image.licenses="MIT" \
    \
    base_image="python:3.9-slim-buster" \
    version="${VERSION}" \
    software="NetPyNe" \
    software.version="${SIMULATOR_VERSION}" \
    about.summary="Python package to facilitate the development, simulation, parallelization, analysis, and optimization of biological neuronal networks using the NEURON simulator" \
    about.home="http://www.netpyne.org/" \
    about.documentation="http://www.netpyne.org/" \
    about.license_file="https://raw.githubusercontent.com/Neurosim-lab/netpyne/development/LICENSE" \
    about.license="SPDX:MIT" \
    about.tags="computational neuroscience,biochemical networks,dynamical modeling,stochastic simulation,NeuroML,LEMS,SED-ML,COMBINE,OMEX,BioSimulators" \
    maintainer="BioSimulators Team <info@biosimulators.org>"

RUN apt-get update -y \
    && apt-get install -y --no-install-recommends \
        mpi \
        libmpich-dev \
    && apt-get autoremove -y \
    && rm -rf /var/lib/apt/lists/*

# Copy code for command-line interface into image and install it
COPY . /root/Biosimulators_pyNeuroML
RUN pip install /root/Biosimulators_pyNeuroML[netpyne] \
    && rm -rf /root/Biosimulators_pyNeuroML
RUN pip install "netpyne==${SIMULATOR_VERSION}"

# Entrypoint
ENTRYPOINT ["biosimulators-netpyne"]
CMD []
