-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dockerized the application and fixed bugs
- Loading branch information
Showing
14 changed files
with
583 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
medmini.pdf | ||
README.md | ||
media/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
med_db/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
FROM alpine:3.14 | ||
FROM node:18-bookworm-slim | ||
|
||
RUN sudo apt install conda | ||
RUN conda env create -f ./build_utils/env.yml | ||
# ARG REACT_NATIVE_PACKAGER_HOSTNAME | ||
|
||
COPY ./App | ||
COPY ./backend.py | ||
COPY ./dbGen.py | ||
COPY ./medmini.py | ||
COPY ./mashqa_data | ||
COPY ./build_utils/run.sh | ||
WORKDIR /medmini | ||
COPY . . | ||
|
||
RUN conda activate medmini | ||
|
||
RUN chmod +x run.sh | ||
RUN run.sh | ||
|
||
RUN mv build_utils/services.sh services.sh \ | ||
&& chmod +x services.sh \ | ||
&& apt-get update \ | ||
# && apt install curl -y \ | ||
&& cd App && npm ci && cd .. \ | ||
&& apt-get update \ | ||
&& apt-get install python3 python3-pip -y \ | ||
&& rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED \ | ||
&& pip3 install torch==2.1.0 --index-url https://download.pytorch.org/whl/cpu \ | ||
&& pip3 install transformers==4.34.1 langchain==0.0.324 Flask==3.0.0 flask-cors==4.0.0 chromadb==0.4.15 sentence-transformers==2.2.2 sentencepiece==0.1.99 | ||
|
||
# SHELL ["/bin/bash", "--login", "-i", "-c"] | ||
# SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
|
||
|
||
|
||
# EXPOSE 19000 19001 19002 | ||
EXPOSE 8081 5000 | ||
|
||
|
||
CMD ./services.sh | ||
|
||
|
||
|
||
# todo | ||
# use a smaller base image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
transformers | ||
langchain | ||
Flask | ||
flask-cors | ||
chromadb | ||
sentence-transformers | ||
sentencepiece | ||
torch --index-url https://download.pytorch.org/whl/cpu |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
|
||
|
||
|
||
python3 backend.py & | ||
cd App/ ; echo EXPO_PUBLIC_HOSTIP=$REACT_NATIVE_PACKAGER_HOSTNAME > .env | ||
npx expo start & | ||
|
||
wait -n | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# updating repositories and installing curl | ||
apt update | ||
apt install curl -y | ||
|
||
# installing node and npm | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash | ||
source ~/.bashrc | ||
nvm install v18.13.0 | ||
|
||
|
||
# installing all node modules required | ||
cd App | ||
npm ci | ||
cd .. | ||
|
||
|
||
# setting up python deps | ||
apt update | ||
apt install python3.10 python3-pip -y | ||
pip3 install torch --index-url https://download.pytorch.org/whl/cpu | ||
pip3 install transformers langchain Flask flask-cors chromadb sentence-transformers sentencepiece | ||
|
||
|
||
#todo | ||
# pull the med_db | ||
|
Oops, something went wrong.