The Neuron Morphology Community Portal is a collection of services for managing annotated neuron data.
The current implementation uses Docker with Docker Compose to manage the multiple independent services. The containers should also be compatible with Podman however this is untested.
A standard installation of Docker is sufficient.
The databases (PostgreSQL and InfluxDB) use Data Volumes. Starting, stopping, and removing/updating the service containers will not remove database contents.
Copy .env-template to .env and set the following values:
NMCP_DATABASE_PW- password for the PostgreSQL databaseNMCP_INFLUX_DB_PASSWORD- password for the InfluxDB admin userNMCP_COMPOSE_PROJECT- Docker Compose project/container prefix, e.g.,nmcpNMCP_LOG_VOLUME- host path mapped to/var/log/nmcpin service containers (can be set to/tmpfor testing)NMCP_SERVICES_FILE- compose file for application services (defaultdocker-compose.services.yml)docker-compose.services.staging.ymlis an alternate that uses images from the develop branch rather than main
NMCP_AUTH_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx- a secret key used between services internally, e.g., a random uuid or similar
NMCP_ONTOLOGY_LOCATIONandNMCP_ONTOLOGY_PATHmust be set- can be set to
/tmpfor deployment testing - otherwise, set to actual host locations for the data on the host machine
- can be set to
NMCP_PRECOMPUTED_OUTPUT- a location url supported by the cloud-volume package for saving data sets generated in the Neuroglancer precomputed format
NMCP_SECRETS_VOLUME- host location of any required secrets files for cloud-volume to be mapped into the necessary containers
NMCP_AUTHENTICATION_CLIENT_ID- AAD application (client) ID for authenticationNMCP_DOI_URL- URL of the NMCP website that generated DOI urls will reference, e.g.,https://morphology.allenneuraldynamics.org/NMCP_DOI_HOST- host of the DataCite API server (production or test)NMCP_DOI_PREFIX- DOI prefix (production or test value as appropriate)NMCP_DOI_USER- DataCite API user credentialNMCP_DOI_PASSWORD- DataCite API password credentialNMCP_DOI_HANDLER- DOI handler base URL, e.g.,https://dois.orgfor production orhttps://handle.test.datacite.orgfor test
Most Docker Compose operations are wrapped in batch scripts to ensure the required flags are correct, e.g., test vs. production.
./up.sh
./stop.sh
./down.sh
destroys existing service containers but does not remove any data volumes. Newer container images can then be pulled and the services restarted with the up script.
./logs.sh
will bring up the correct set of Compose logs for this container set (vs. test or any other deployment on the same host).
./dev.sh
will start only those services that are not developed as part of the project, e.g., generic database instances. The rest of the services are presumed to be run locally from code, etc.
Precomputed skeletons and other system-generated Neuroglancer data sources that are typically stored in S3 or similar can be
hosted locally via an S3-compatible service, setting NMCP_PRECOMPUTED_OUTPUT for nmcp-client, and configuring nmcp-precomputed
for this service.
One option is to run a local MinIO Docker container as an S3-compatible destination. By default, the MinIO container will run on port 9000.
- Create a bucket in MinIO
- Set the expected env var
NMCP_PRECOMPUTED_OUTPUTtohttp://localhost:9000/<your-bucket>/ngv01when runningnmcp-client - In your Python environment for
nmcp-precomputed, use thecloudfilescommand line interface to configure the MinIO instance as an alias - Configure a minio-secrets.json files for this instance, as described in the
cloudvolumeandcloudfilesdocumentation - Pass the MinIO alias as the output location (
-oargument) when runningnmcp-precomputed
Additional details on using an alias with cloudfiles can be found in the nmcp-computed README.