From 06b38f8c946a4b435197d0c45f91280c42d49d09 Mon Sep 17 00:00:00 2001 From: Kurt Heiden Date: Mon, 28 Oct 2024 11:21:10 -0600 Subject: [PATCH] Add docker-compose build Purpose: Ensuring that all dependencies are captured both at the container level and the python level. --- .env.template | 1 + Dockerfile | 12 ++++++++++++ README.md | 5 +++++ build.py | 1 + docker-compose.yaml | 10 ++++++++++ requirements.txt | 4 ++++ 6 files changed, 33 insertions(+) create mode 100644 .env.template create mode 100644 Dockerfile create mode 100644 build.py create mode 100644 docker-compose.yaml create mode 100644 requirements.txt diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..9847a1d --- /dev/null +++ b/.env.template @@ -0,0 +1 @@ +OPENAI_API_KEY= \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5d0954e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.12.0 + +RUN apt-get update -y && apt-get upgrade -y +RUN pip install --upgrade pip + +COPY requirements.txt /src/requirements.txt + +WORKDIR /src + +RUN pip install -r requirements.txt + +ENTRYPOINT ["python", "build.py"] \ No newline at end of file diff --git a/README.md b/README.md index bde1855..60b405d 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,11 @@ To get started: 3. Make your changes. 4. Submit a pull request. +## Building +1. Clone the repository. +2. `cd` to the root directory. +3. Run `docker-compose up --build` + ## License SimpleMind is licensed under the MIT License. diff --git a/build.py b/build.py new file mode 100644 index 0000000..e321660 --- /dev/null +++ b/build.py @@ -0,0 +1 @@ +print('Build successful.') \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..d756f99 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +services: + simplemind: + build: + context: . + dockerfile: Dockerfile + volumes: + - ./simplemind:/src/simplemind + - ./build.py:/src/build.py + env_file: + - .env \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6926b64 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +instructor +anthropic +requests +openai \ No newline at end of file