diff --git a/README.md b/README.md index 5b40508..481474d 100644 --- a/README.md +++ b/README.md @@ -154,10 +154,12 @@ scheduler: --- -### 🐳 Day 6 – Dockerization -- [ ] Write `Dockerfile` and `docker-compose.yml` -- [ ] Test local build and `.env` passthrough -- [ ] Optional: containerize Ollama model if running locally +### 🐳 ~~Day 6 – Dockerization~~ +- [x] Write `Dockerfile` and `docker-compose.yml` +- [x] Test local build and `.env` passthrough +- [ ] (Optional) Add docker-compose.yml for repeatable builds across machines `added but not tested` +- [ ] (Optional) Document how to run with volume mounts if persistence is needed +- [ ] (Optional) containerize Ollama model if running locally `not likely to happen, part of the reason this works is thanks to a separate Ollama instance` --- diff --git a/src/__pycache__/ai.cpython-310.pyc b/src/__pycache__/ai.cpython-310.pyc index d158f29..f84abf2 100644 Binary files a/src/__pycache__/ai.cpython-310.pyc and b/src/__pycache__/ai.cpython-310.pyc differ diff --git a/src/ai.py b/src/ai.py index 310aa06..c8de49f 100644 --- a/src/ai.py +++ b/src/ai.py @@ -6,7 +6,11 @@ from dotenv import load_dotenv from personality import load_persona load_dotenv() -AI_URL = os.getenv("OLLAMA_API_URL") # e.g., http://localhost:11434/api/generate +AI_URL = os.getenv("OLLAMA_API") # match .env and Docker ENV (e.g., http://localhost:11434/api/generate) + +if not AI_URL: + raise ValueError("❌ OLLAMA_API environment variable is not set.") + def get_ai_response(user_prompt): persona = load_persona() diff --git a/src/scheduler/__pycache__/__init__.cpython-310.pyc b/src/scheduler/__pycache__/__init__.cpython-310.pyc index e235c9f..b5d7dd8 100644 Binary files a/src/scheduler/__pycache__/__init__.cpython-310.pyc and b/src/scheduler/__pycache__/__init__.cpython-310.pyc differ