The repository contains code and data for the LLM-based city management research.
Create the $NSS_NPA_TOKEN
environment variable on the server
Pull changes:
cd /var/essdata/llm/project/BIAM-Urb
git checkout <required_branch>
git pull
Create config.env
in the root of the project:
LLAMA_URL=<url>
LLAMA_FC_URL=<url>
ENDPOINT_LISTINGS_URL=<url>
ENDPOINT_CITY_URL=<url>
ENDPOINT_METRICS_URL=<url>
ENDPOINT_PROVISION_URL=<url>
ENDPOINT_TABLES_URL=<url>
Rebuild the image and run the container
docker container stop llm_city_app-container
docker container rm llm_city_app-container
# use --no-cache key if the entire image needs to be rebuilt (e.g. dependencies changed)
docker build -t llm_city_app --build-arg NSS_NPA_TOKEN=$NSS_NPA_TOKEN -f docker/app/Dockerfile --no-cache .
docker run -d --restart always -p <port>:80 --name llm_city_app-container llm_city_app
In the terminal, send a request:
curl -v POST http://<ip>:<port>/question -H 'Content-Type: application/json' -d '{"question_body": "What are the problems of demographic development of St. Petersburg?"}'
In the browser:
http://<ip>:<port>/docs/
The application logs can be checked on the server:
docker logs --follow --timestamps llm_city_app-container
Start the server (from the project root):
fastapi run main.py --proxy-headers --port 80
In the terminal, send a query:
curl -v POST http://0.0.0.0:80/question -H ‘Content-Type: application/json’ -d ‘{’question_body‘: “What are the problems of demographic development of St. Petersburg?”}’
In the browser:
http://localhost/docs#/
Copy compose.yaml to the server
Execute the command:
docker compose up