- Node >= 16.0.0
- npm >= 8.0.0
- Python >= 3.9.0
- pip >=21.0.0
* These are the versions I have that work; while I know Python 3.9 or higher is necessary, the others may not strictly require the listed versions.
** If you are running this locally on Google Chrome, you will likely run into issues with CORS (Cross-Origin Requests) that I have been unable to completely resolve. I would recommend using a different browser, using the Docker method, or finding some way to disable CORS on Chrome while running this.
When first cloned, run the command:
git submodule init
to initialize the contained ontology-mapper
repository.
Then, after initialization run the command
git submodule update
to update to the specific version of the ontology-mapper
repository pinned to the UI. If instead you want to update to the latest version of theontology-mapper
repository, run
git submodule update --remote flask-api/ontology-mapper
Then, run the command:
npm install
to install all necessary packages for the React frontend.
Next, go into the flask-api
folder (perhaps by running cd flask-api
) and run
pip install -r requirements.txt
to install necessary packages for the Flask api.
Afterards, navigate into the ontology-mapper
submodule (like by running cd ontology-mapper
) and run
pip install .
to install the necessary packages for the mapper itself.
To run, make sure you are in the root of the repository and run, in two separate command line instances, the command
npm start
to start the front-end, which can be seen at localhost:3000
, and the command
npm run flask-api
to start the back-end, which can be interacted with at localhost:5000
.
- Docker
When first cloned, run the command:
git submodule init
to initialize the contained ontology-mapper
repository.
Then, after initialization run the command
git submodule update
to update the local version of that submodule.
Before running, make sure you have the latest version of the repository built by running the command"
docker-compose build
Docker should build two images:
ontology-mapper-api
: the Flask backend APIontology-mapper-client
: the React frontend
To run the website, run the command:
docker-compose up
Docker should build two containers corresponding to the two images.
In a browser, navigate to localhost:3000
to see the front-end.
Initial setup of React and Flask and Dockerization aided by an article series by Miguel Grinberg.