From c78b90a0b811b6a50b0121e7001f75ccd736e815 Mon Sep 17 00:00:00 2001 From: Aditya Rai Date: Sat, 29 Jul 2023 03:55:36 +0530 Subject: [PATCH] Added dockerfile and docker-compose configuration for easy setup --- README.md | 12 ++++++++++++ build.dockerfile | 11 +++++++++++ docker-compose.yml | 8 ++++++++ 3 files changed, 31 insertions(+) create mode 100644 build.dockerfile create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 34132322..17687c6e 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,18 @@ streamlit run streamlit_app.py **Additional Note**: The Vector Similarity part is precomputed to optimize performance due to the resource-intensive nature of sentence encoders that require significant GPU and RAM resources. If you are interested in leveraging this feature in a Google Colab environment for free, refer to the upcoming blog (link to be provided) for further guidance. +
+ +### Docker + +1. Build image and start application + ```bash + docker-compose up + ``` +2. Open ```localhost:80``` on your browser + + +
--- diff --git a/build.dockerfile b/build.dockerfile new file mode 100644 index 00000000..a3881652 --- /dev/null +++ b/build.dockerfile @@ -0,0 +1,11 @@ +FROM python:3.11.0-slim +WORKDIR /data +COPY . . +RUN apt-get update +RUN apt-get install -y build-essential python-dev git +RUN pip install -U pip setuptools wheel +RUN pip install -r requirements.txt +RUN python run_first.py +ENTRYPOINT [ "streamlit", "run", "streamlit_app.py"] + +EXPOSE 8501 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..5cda3867 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + resume-matcher: + image : resume-matcher + build: + context: ./ + dockerfile : build.dockerfile + ports: + - 80:8501