set up chroma
This commit is contained in:
parent
9b57e2b9ea
commit
c3c4445d33
@ -7,12 +7,17 @@ ENV PYTHONUNBUFFERED 1
|
|||||||
|
|
||||||
ADD src/ /blog_creator
|
ADD src/ /blog_creator
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
RUN apt-get update && apt-get install -y rustc cargo python-is-python3 pip python3-venv libmagic-dev git
|
RUN apt-get update && apt-get install -y rustc cargo python-is-python3 pip python3-venv libmagic-dev git
|
||||||
# Need to set up git here or we get funky errors
|
# Need to set up git here or we get funky errors
|
||||||
RUN git config --global user.name "Blog Creator"
|
RUN git config --global user.name "Blog Creator"
|
||||||
RUN git config --global user.email "ridgway.infrastructure@gmail.com"
|
RUN git config --global user.email "ridgway.infrastructure@gmail.com"
|
||||||
RUN git config --global push.autoSetupRemote true
|
RUN git config --global push.autoSetupRemote true
|
||||||
#Get a python venv going as well cause safety
|
#Get a python venv going as well cause safety
|
||||||
|
=======
|
||||||
|
RUN apt-get update && apt-get install -y rustc cargo python-is-python3 pip python3-venv libmagic-dev
|
||||||
|
|
||||||
|
>>>>>>> d35a456 (set up chroma)
|
||||||
RUN python -m venv /opt/venv
|
RUN python -m venv /opt/venv
|
||||||
ENV PATH="/opt/venv/bin:$PATH"
|
ENV PATH="/opt/venv/bin:$PATH"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
networks:
|
networks:
|
||||||
|
<<<<<<< HEAD
|
||||||
net:
|
net:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
@ -42,3 +43,54 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
chroma-data:
|
chroma-data:
|
||||||
driver: local
|
driver: local
|
||||||
|
=======
|
||||||
|
net:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
services:
|
||||||
|
blog_creator:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: blog_creator
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- ./generated_files/:/blog_creator/generated_files
|
||||||
|
|
||||||
|
chroma:
|
||||||
|
image: chromadb/chroma
|
||||||
|
volumes:
|
||||||
|
# Be aware that indexed data are located in "/chroma/chroma/"
|
||||||
|
# Default configuration for persist_directory in chromadb/config.py
|
||||||
|
# Read more about deployments: https://docs.trychroma.com/deployment
|
||||||
|
- chroma-data:/chroma/chroma
|
||||||
|
command: "--workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30"
|
||||||
|
environment:
|
||||||
|
- IS_PERSISTENT=TRUE
|
||||||
|
- CHROMA_SERVER_AUTHN_PROVIDER=${CHROMA_SERVER_AUTHN_PROVIDER}
|
||||||
|
- CHROMA_SERVER_AUTHN_CREDENTIALS_FILE=${CHROMA_SERVER_AUTHN_CREDENTIALS_FILE}
|
||||||
|
- CHROMA_SERVER_AUTHN_CREDENTIALS=${CHROMA_SERVER_AUTHN_CREDENTIALS}
|
||||||
|
- CHROMA_AUTH_TOKEN_TRANSPORT_HEADER=${CHROMA_AUTH_TOKEN_TRANSPORT_HEADER}
|
||||||
|
- PERSIST_DIRECTORY=${PERSIST_DIRECTORY:-/chroma/chroma}
|
||||||
|
- CHROMA_OTEL_EXPORTER_ENDPOINT=${CHROMA_OTEL_EXPORTER_ENDPOINT}
|
||||||
|
- CHROMA_OTEL_EXPORTER_HEADERS=${CHROMA_OTEL_EXPORTER_HEADERS}
|
||||||
|
- CHROMA_OTEL_SERVICE_NAME=${CHROMA_OTEL_SERVICE_NAME}
|
||||||
|
- CHROMA_OTEL_GRANULARITY=${CHROMA_OTEL_GRANULARITY}
|
||||||
|
- CHROMA_SERVER_NOFILE=${CHROMA_SERVER_NOFILE}
|
||||||
|
restart: unless-stopped # possible values are: "no", always", "on-failure", "unless-stopped"
|
||||||
|
ports:
|
||||||
|
- "8001:8000"
|
||||||
|
healthcheck:
|
||||||
|
# Adjust below to match your container port
|
||||||
|
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v2/heartbeat" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
networks:
|
||||||
|
- net
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
chroma-data:
|
||||||
|
driver: local
|
||||||
|
>>>>>>> d35a456 (set up chroma)
|
||||||
|
@ -19,7 +19,13 @@ for note in tril_notes:
|
|||||||
print(tril_notes[note]['title'])
|
print(tril_notes[note]['title'])
|
||||||
# print(tril_notes[note]['content'])
|
# print(tril_notes[note]['content'])
|
||||||
print("Generating Document")
|
print("Generating Document")
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
ai_gen = omg.OllamaGenerator(tril_notes[note]['title'],
|
||||||
|
tril_notes[note]['content'],
|
||||||
|
"openthinker:7b")
|
||||||
|
>>>>>>> d35a456 (set up chroma)
|
||||||
os_friendly_title = convert_to_lowercase_with_underscores(tril_notes[note]['title'])
|
os_friendly_title = convert_to_lowercase_with_underscores(tril_notes[note]['title'])
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
ai_gen = omg.OllamaGenerator(os_friendly_title,
|
ai_gen = omg.OllamaGenerator(os_friendly_title,
|
||||||
|
@ -3,6 +3,7 @@ from urllib.parse import quote
|
|||||||
from git import Repo
|
from git import Repo
|
||||||
from git.exc import GitCommandError
|
from git.exc import GitCommandError
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
class GitRepository:
|
class GitRepository:
|
||||||
# This is designed to be transitory it will desctruvtively create the repo at repo_path
|
# This is designed to be transitory it will desctruvtively create the repo at repo_path
|
||||||
# if you have uncommited changes you can kiss them goodbye!
|
# if you have uncommited changes you can kiss them goodbye!
|
||||||
@ -20,6 +21,13 @@ class GitRepository:
|
|||||||
git_user = quote(username)
|
git_user = quote(username)
|
||||||
git_password = quote(password)
|
git_password = quote(password)
|
||||||
remote = f"{git_protocol}://{git_user}:{git_password}@{git_remote}"
|
remote = f"{git_protocol}://{git_user}:{git_password}@{git_remote}"
|
||||||
|
=======
|
||||||
|
|
||||||
|
def try_something(test):
|
||||||
|
|
||||||
|
# Set the path to your blog repo here
|
||||||
|
blog_repo = "/path/to/your/blog/repo"
|
||||||
|
>>>>>>> d35a456 (set up chroma)
|
||||||
|
|
||||||
if os.path.exists(repo_path):
|
if os.path.exists(repo_path):
|
||||||
shutil.rmtree(repo_path)
|
shutil.rmtree(repo_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user