Metadata-Version: 2.1
Name: nestml-server
Version: 1.0.0b1
Summary: A server instance for NESTML
Author-email: Sebastian Spreizer <spreizer@web.de>
License: MIT License
        
        Copyright (c) 2024 Sebastian Spreizer
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/babsey/nestml-server
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# NESTML Server

### Install

Install NEST Simulator into home folder because of non-root permission
to write files into nest install directory.

```
wget https://github.com/nest/nest-simulator/archive/refs/heads/master.zip -O /tmp/nest-simulator-master.zip
unzip /tmp/nest-simulator-master.zip -d /tmp/
rm -rf /tmp/nest-build/; mkdir -p /tmp/nest-build; cd /tmp/nest-build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/opt/nest-nestml /tmp/nest-simulator-master
make -j $(nproc)
make install
```

#### Singularity

Use singularity or install all requirements in host.

Build Singularity images with all requirements for NESTML and server

```
sudo singularity build nestml-server.sif singularity/nest-server.def
```

Use Singularity for NESTML Server and Jupyter notebook

```
singularity shell nestml-server.sif
```

### Usage

Source config variables of NEST to load path and pythonpath.

```
source $HOME/opt/nest-nestml/bin/nest_vars.sh
```

##### A. Start NESTML Server

```
gunicorn nestml_server:app --bind 0.0.0.0:52426 --timeout 120
```

##### B. Start Jupyter notebook

User can send code to NESTML server to build and install NESTML models.

```
cd notebook
jupyter notebook
```
