diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml index dc1a672c..4f805686 100644 --- a/.github/workflows/e2e_tests.yml +++ b/.github/workflows/e2e_tests.yml @@ -81,8 +81,8 @@ jobs: # TODO this should be enhanced to use a buildx bake to leverage layer caching for faster builds, or push to repo and simply have a pull for the run # TODO docker-compose files should be refactored to use scopes instead of different versions for each environment echo "Starting docker containers for dbs and server ..." - docker-compose pull - docker-compose up -d --build datadb recipedb server chat + docker compose pull + docker compose up -d --build datadb recipedb server chat # TODO: For some reason, maybe buildkit, in Github docker compose builds the image differently, and it doesn't work. Individual image build works. docker build --build-arg OPENAI_API_KEY=$ASSISTANTS_API_KEY \ diff --git a/.github/workflows/get_memory_test.yml b/.github/workflows/get_memory_test.yml index 25ae5e18..5f0b2856 100644 --- a/.github/workflows/get_memory_test.yml +++ b/.github/workflows/get_memory_test.yml @@ -77,8 +77,8 @@ jobs: ls data/datadb echo "Starting docker containers for dbs and server ..." - docker-compose pull - docker-compose up -d --build datadb recipedb server datadb + docker compose pull + docker compose up -d --build datadb recipedb server datadb sleep 10 diff --git a/deployment/deploy_azure.py b/deployment/deploy_azure.py index 38fe6500..3942a6cb 100644 --- a/deployment/deploy_azure.py +++ b/deployment/deploy_azure.py @@ -14,6 +14,7 @@ import docker from dotenv import load_dotenv +# client = docker.from_env() load_dotenv() container_registry = os.getenv("AZURE_CONTAINER_REGISTRY") @@ -25,8 +26,11 @@ if sys.platform == "darwin": print("Running on Mac") + print(f"container_registry: {container_registry}") + print(f"repo: {repo}") client = docker.DockerClient( - base_url="unix:///Users/matthewharris/.docker/run/docker.sock " + # base_url="unix:///Users/matthewharris/.docker/run/docker.sock " + base_url="unix:///Users/t.o./.docker/run/docker.sock " ) else: client = docker.from_env() @@ -72,8 +76,8 @@ def deploy(): sys.exit() tags = { - "data-recipes-ai-server": [f"{container_registry}/{repo}", "server"], - "data-recipes-ai-chat": [f"{container_registry}/{repo}", "chat"], + "data-recipes-ai-server:latest": [f"{container_registry}/{repo}", "server"], + "data-recipes-ai-chat:latest": [f"{container_registry}/{repo}", "chat"], } run_cmd("az login") @@ -87,13 +91,15 @@ def deploy(): f"DOCKER_DEFAULT_PLATFORM={azure_platform} && docker compose -f {docker_compose_file} build" ) + # run_cmd("docker compose build") + for image in tags.keys(): print(f"Tagging {image} image ... with tag {tags[image][0]}:{tags[image][1]}") client.images.get(image).tag(tags[image][0], tags[image][1]) print(f"Pushing {image} image ... to {tags[image][0]}:{tags[image][1]}") client.images.push(tags[image][0], tags[image][1]) - sys.exit() + # sys.exit() run_cmd(f"docker compose -f {docker_compose_file} down") run_cmd(f"docker compose -f {docker_compose_file} pull") diff --git a/requirements.txt b/requirements.txt index 8b11be6c..9e26e688 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ langchain_openai==0.1.7 literalai==0.0.604 matplotlib==3.9.0 pandas==2.2.2 -pgvector==0.2.4 +pgvector==0.2.5 plotly==5.22.0 psycopg2_binary==2.9.9 pyarrow==16.1.0 diff --git a/server/robocorp/actions_plugins/recipe-server/package.yaml b/server/robocorp/actions_plugins/recipe-server/package.yaml index b1d4ce05..22421ee6 100644 --- a/server/robocorp/actions_plugins/recipe-server/package.yaml +++ b/server/robocorp/actions_plugins/recipe-server/package.yaml @@ -21,8 +21,7 @@ dependencies: - robocorp-actions=0.0.7 - langchain=0.1.16 - langchain_community=0.0.34 - - langchain_openai=0.1.3 - - psycopg2-binary=2.9.3 + - langchain_openai=0.1.3 - pgvector=0.2.5 - python-dotenv=0.19.1 - pillow=10.3.0 @@ -32,3 +31,4 @@ dependencies: - seaborn=0.13.2 - geopandas=0.10.2 - hdx_python_api=6.2.4 + - psycopg2-binary=2.9.3 diff --git a/server/robocorp/package.yaml b/server/robocorp/package.yaml index 873e976e..fcd38f2e 100644 --- a/server/robocorp/package.yaml +++ b/server/robocorp/package.yaml @@ -23,6 +23,6 @@ dependencies: - langchain=0.1.16 - langchain_community=0.0.34 - langchain_openai=0.1.3 - - psycopg2-binary=2.9.3 - pgvector=0.2.5 + - psycopg2-binary=2.9.3 diff --git a/utils/recipes.py b/utils/recipes.py index 8978d208..46de730b 100644 --- a/utils/recipes.py +++ b/utils/recipes.py @@ -96,6 +96,7 @@ def initialize_vector_db(): collection_name=COLLECTION_NAME, connection_string=CONNECTION_STRING, embedding_function=embedding_model, + create_extension=False, ) return db