Skip to content

Latest commit

 

History

History
94 lines (62 loc) · 1.93 KB

deployment_guide.md

File metadata and controls

94 lines (62 loc) · 1.93 KB

UrbanKit Deployment Tutorial

  • Clone this repo

    git clone https://github.com/peijl1998/UrbanKit.git
  • For urban_kit_frontend (root_path = "xxx/urban_kit_frontend")

  • For urban_kit_backend (root_path = "xxx/urban_kit_backend")

    • install mongodb

      apt install mongodb
    • install required python libs

      pip install django
      pip install django-cors-headers
      pip install pymongo
      pip install geopy
      pip install torch torchvision fastdtw lightgbm
    • some operations on mongodb

      # interactive mongodb
      mongo
      
      > use urbankit
      > db.createUser({user:"root",pwd:"123456",roles:[{role:"dbAdmin",db:"urbankit"}]})
    • some preparations

      mkdir Config
      echo "{}" > ./Config/SI-AGAN.cfg
    • start backend

      python3 manage.py runserver 0.0.0.0:8000
  • Start the service

    • assign the backend addr in src/api/global_config.js (like addr in "start backend" command)

    • create user_config.json in the root path of repo (the path of user_config_example.json), fill in your mongodb config, like

      {
              "mongodb": {
                      "database": "urbankit",
                      "user": "root",
                      "password": "123456",
                      "address": "127.0.0.1",
                      "port": "27017"
              }
      }
    • upload the demo.csv and enjoy it:)

      • NOTE: set attribute in the MapController at first.
      • for interpolation model, you can upload the demo model in the urban_kit_backend/UrbanModels/SI_AGAN/Generator.pth