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

ARG VERSION=0.0.11
ARG SIMULATOR_VERSION="8.0.0"

# metadata
LABEL \
    org.opencontainers.image.title="NEURON" \
    org.opencontainers.image.version="${SIMULATOR_VERSION}" \
    org.opencontainers.image.description="Simulation environment for building and using computational models of neurons and networks of neurons" \
    org.opencontainers.image.url="https://neuron.yale.edu/" \
    org.opencontainers.image.documentation="https://neuron.yale.edu/neuron/docs" \
    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="BSD-3-Clause" \
    \
    base_image="python:3.9-slim-buster" \
    version="${VERSION}" \
    software="NEURON" \
    software.version="${SIMULATOR_VERSION}" \
    about.summary="Simulation environment for building and using computational models of neurons and networks of neurons" \
    about.home="https://neuron.yale.edu/" \
    about.documentation="https://neuron.yale.edu/neuron/docs" \
    about.license_file="https://raw.githubusercontent.com/neuronsimulator/nrn/master/Copyright" \
    about.license="SPDX:BSD-3-Clause" \
    about.tags="computational neuroscience,biochemical networks,dynamical modeling,stochastic simulation,NeuroML,LEMS,SED-ML,COMBINE,OMEX,BioSimulators" \
    maintainer="BioSimulators Team <info@biosimulators.org>"

# install requirements to compile NEURON mod files
RUN apt-get update -y \
    && apt-get install -y --no-install-recommends gcc g++ make \
    && 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[neuron] \
    && rm -rf /root/Biosimulators_pyNeuroML
RUN pip install "neuron==${SIMULATOR_VERSION}"

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