Skip to content

Commit

Permalink
Made changes to chat app to enable docker deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
neal-logan committed Nov 24, 2024
1 parent 41ea386 commit f355eec
Show file tree
Hide file tree
Showing 13 changed files with 484 additions and 469 deletions.
19 changes: 19 additions & 0 deletions MinuteMate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@
- **Response Generation** - Generates a response, typically by sending a request to a generative model with the original user prompt and a system prompt including selected resources acquired from the vector database.
- **Trust & Safety** - Two separate stages, each using an external generative model. The first stage examines only the incoming prompt. If an inappropriate prompt is detected at this stage, all ordinary steps are skipped and a response is sent declining the prompt. The second examines generated responses and vetoes those with inappropriate content.

##### Setup - Docker



In MinuteMate/back:

Set up secrets in a .env file according to .env.example

```bash
docker compose --env-file .env up -d --build
```

In MinuteMate/front:

```bash
docker compose up -d --build
```


##### Setup - Repo

**Front-End
Expand Down
6 changes: 6 additions & 0 deletions MinuteMate/back/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#OPENAI API KEY
OPENAI_API_KEY =

# Weaviate cloud deployment
WEAVIATE_URL =
WEAVIATE_API_KEY =
13 changes: 7 additions & 6 deletions MinuteMate/back/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:3.11-slim
WORKDIR /App
COPY . /App
RUN python -m pip install -r requirements.txt
EXPOSE 8000
CMD [" ", "start","--port","8002","--host","0.0.0.0"]
FROM python:3.11
WORKDIR /app
COPY . /app
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
EXPOSE 8001
CMD ["uvicorn", "main:app","--host","0.0.0.0","--port","8001"]
11 changes: 11 additions & 0 deletions MinuteMate/back/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
chat_backend:
build:
context: ./
dockerfile: Dockerfile
ports:
- 8001:8001
environment:
- WEAVIATE_ENDPOINT_URL=$WEAVIATE_ENDPOINT_URL
- WEAVIATE_API_KEY=$WEAVIATE_API_KEY
- OPENAI_API_KEY=$OPENAI_API_KEY
Loading

0 comments on commit f355eec

Please sign in to comment.