This repo contains the code for the FUNUus! MuRAG System -- a multimodal RAG-based Assistant to explore the FUNDus! database.
Note that this only works for LT and HCDS members. If you are not a member, you can request access to the data by contacting the Florian Schneider.
- Create a folder
data
in the root of the project - Copy the DataFrames from
/ltstorage/shares/projects/fundus-murag/data
to thedata
folder - Contact Florian Schneider to get the Google Service Acoount Credentials file and place it in the
data
folder (or create a new one with your Google Cloud account)
- Navigate to the
docker
folder - Run
./setup-folders.sh
to create the necessary folders for the Docker volumes - Edit the
.env.example
file and save it as.env
with the modified values
- Run
docker compose pull
to pull the necessary images - Run
docker compose up -d
to start the system - Run
docker compose logs -f
to see the logs of the running containers
- Create a virtual environment with Python 3.10
- Navigate to repository root
- Install the requirements with
pip install -r requirements.txt
- Get the data as described in the Docker section
- Navigate to the
docker
folder - Run
./setup-folders.sh
to create the necessary folders for the Docker volumes - Edit the
.env.dev.example
file and save it as.env.dev
with the modified values - Navigate back to the repository root
- Edit the
config/config.dev.example.yaml
file and save it asconfig/config.dev.yaml
with the modified values
You only need to do this if you want to run the ML service locally, e.g., to change the Embedding Model or add new functionality. Otherwise, skip this.
- Navigate to repository root
- In the
src/fundus_murag/ml/server.py
file, set the port to a random number (e.g., 23456) - Run
CUDA_VISIBLE_DEVICES=1 PYTHONPATH=src FUNDUS_ML_DEV_MODE=1 python src/fundus_murag/ml/server.py
to start the ML service in development mode - Check the logs to see on which port the service is running. You will need this port to start the MESOP application
- Navigate to the
docker
folder - (Optional) If you run the ML service in development mode, remove the
fundusml
profile from the.env.dev
- Run
docker compose --env-file .env.dev up
in atmux
or similar shell to start the dev containers (i.e., Weaviate) - Run
curl http://localhost:<YOUR_FUNDUS_ML_EXPOSED_PORT>/embed
to check whether the FUNDus ML Service is up and running. This should print sth. like{"detail":"Method Not Allowed"}
- Navigate to repository root
- Select a port of your choice (e.g., the
FUNDUS_UI_EXPOSED
defined in thedocker/.env
file) - Run
FUNDUS_CONFIG_FILE=config.dev.yaml PYTHONPATH=src mesop --port <PORT OF YOUR CHOICE> src/fundus_murag/ui/main.py
to start the FUNDus MuRAG application. - Open your browser and navigate to
http://localhost:<PORT OF YOUR CHOICE>
to see the application. Don't forget to forward the port if you are running the application on a remote server.