diff --git a/.dockerignore b/.dockerignore index 26fb440..156829a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,7 @@ medmini.pdf -README.md media/ +run.sh +install.sh +docker-run.sh +.gitignore +.git/ \ No newline at end of file diff --git a/README.md b/README.md index fdb4b2b..d0c51b6 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,22 @@ ![Pipeline](./media/diagram.png) +## **Installation Instructions** +### **Quickstart - Docker** _Memory Heavy_ +- `sudo chmod +x docker-run.sh` +- `sudo ./docker-run.sh` -## **Instructions for Setup** + **Uninstalling** + - `sudo docker image rm medmini` + + +### **Raw Install** _Best Performance_ +- `sudo chmod +x install.sh ; ./install.sh` +- `sudo chmod +x run.sh ; ./run.sh` +- _Need to have a ubuntu>=22.04 or debian>=12 based distro_ -1. `cd mashqa_data` -2. `python format.py` -3. `cd ..; python dbGen.py` -## **Instructions to run** -1. `cd App; npx expo start` -2. `python backend.py` ## **Future work** -1. Dockerisation of the project to allow it to run from any IP address without having to do many changes. -2. Improve the RAG algorithm without compromising on efficiency \ No newline at end of file +1. Improve the RAG algorithm without compromising on efficiency \ No newline at end of file diff --git a/docker-run.sh b/docker-run.sh new file mode 100644 index 0000000..92927fd --- /dev/null +++ b/docker-run.sh @@ -0,0 +1,6 @@ +#!/bin/bash + + +docker pull medmini + +docker run -it --rm -p 8081:8081 -p 5000:5000 -e REACT_NATIVE_PACKAGER_HOSTNAME=$(hostname -I | awk '{print $1}') -e EXPO_DEVTOOLS_LISTEN_ADDRESS="0.0.0.0" medmini \ No newline at end of file diff --git a/run.sh b/run.sh index 589cc95..2f88170 100644 --- a/run.sh +++ b/run.sh @@ -1,3 +1,15 @@ #!/bin/bash -# subshell for starting frontedn and backend \ No newline at end of file +# setting environment variables +export REACT_NATIVE_PACKAGER_HOSTNAME=$(hostname -I | awk '{print $1}') +export EXPO_DEVTOOLS_LISTEN_ADDRESS="0.0.0.0" + +# starting frontend and backend +python3 backend.py & +cd App/ ; echo EXPO_PUBLIC_HOSTIP=$REACT_NATIVE_PACKAGER_HOSTNAME > .env +npx expo start & + +wait -n + +exit $? + diff --git a/todo b/todo new file mode 100644 index 0000000..edee819 --- /dev/null +++ b/todo @@ -0,0 +1 @@ +- provide the med_db data on a link \ No newline at end of file