- Docker, Rancher Desktop or a similar container environment. This could be a CLI container builder with a separate virtual machine runner, for example Colima.
-
Install Colima:
brew install colima -
Then edit
~/.colima/default/colima.yamland increasememoryto least 4G; optionally increasecpu. -
Use Docker's CLI:
brew install docker docker-buildx docker-compose brew link docker -
Edit
~/.docker/config.jsonand insert:"cliPluginsExtraDirs": [ "/opt/homebrew/lib/docker/cli-plugins" ]
-
Clone this repository and change into it.
-
In the
./buildsub-directory:docker buildx build -t flatmap .
- Environment variables are used for runtime parameters and must be set before services are started:
SCICRUNCH_API_KEYshould be set to be a valid SciCrunch API key.FLATMAP_SOURCE_ROOTneeds to be set to a directory path on the host that includes the source directories of maps which will be made.FLATMAP_SERVER_PORTis optional. It specifies the port to access the bundled map server, and defailts to8000.
-
In the
./rundirectory:docker compose up
-
Open a different terminal session to that running the
flatmapservices. -
Ensure the
SCICRUNCH_API_KEYandFLATMAP_SOURCE_ROOTenvironment variables are set. -
In the
./rundirectory:python runmaker.py --source SOURCE_MANIFEST_PATH [OTHER OPTIONS] -
The
SOURCE_MANIFEST_PATHmust be under theFLATMAP_SOURCE_ROOTdirectory tree. -
Due to issues with
gitaccessing host files when running in a container, the map's sources cannot be in a repository which is a submodule of some parent. -
pythonabove can be the system Python -- therunmaker.pywrapper uses no third-party packages and doesn't have to be installed into a virtual Python environment. -
python runmaker.py --helpshowsmapmaker's runtime help. All options can be used, although--outputis ignored.
- Point a web browser at http://localhost:8000/viewer, substituting the value of
FLATMAP_SERVER_PORTfor8000if it was set above.