Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add docker-compose #113

Open
wants to merge 186 commits into
base: main
Choose a base branch
from
Open

chore: add docker-compose #113

wants to merge 186 commits into from

Conversation

alejandrodnm
Copy link
Contributor

@alejandrodnm alejandrodnm commented Oct 11, 2024

Adds a Docker compose example.

Installs the pgai extension when building the Docker container.

Enables auto prefix for the env vars of the vectorizer cli options.

billy-the-fish and others added 30 commits July 10, 2024 14:30
Co-authored-by: John Pruitt <[email protected]>
Signed-off-by: Iain Cox <[email protected]>
chore: language update for install from source.
Fixed error in how we describe models available via pgai

Signed-off-by: Avthar Sewrathan <[email protected]>
Move asdf plpython3u instructions to plpython3u section
* "Internal" Python code is now supported
* New versions do not install Python dependencies
  system-wide
* Each version's Python code and dependencies are
  installed to separate target locations
* The path to the Python libs can be overridden
  via postgres.conf
* SQL source code is either idempotent or
  incremental
* Create extension-owned ai schema
* Add migration table to manage incremental SQL
* Revised make to facilitate all of the above
* Lint sql with pgspot
Signed-off-by: Mike Freedman <[email protected]>
Fix typo referencing OpenAI instead of Ollama
environement -> environment

Signed-off-by: Ikko Eltociear Ashimine <[email protected]>
…ke_pizza.sql

rm doc/rag_demo_*
rm docs/pgai_rag*
jgpruitt and others added 18 commits October 3, 2024 14:31
refactor: use monorepo structure

* refactor: update .gitignore paths

* refactor: path fixes and clarifications in build.py

* chore: fix formatting in extension tests

* refactor: update paths in test_contents

* refactor: update paths in test_dump_restore

* refactor: update paths in test_privileges

* refactor: update paths in test_cli

* fix: format sql identifiers in test_vectorizer

* refactor: calc vcr cassette dir

* refactor: use single tiktoken_cache across tests

* fix: handle when tictoken_cache is str in cli

* chore: fix formating and reenable ci check

* chore: run ci vectorizer tests not in docker

---------

Co-authored-by: John Pruitt <[email protected]>
@alejandrodnm alejandrodnm marked this pull request as ready for review October 11, 2024 20:02
Adds a Docker compose example.

Installs the pgai extension in the when building the Docker container.

Enables auto prefix for the env vars of the vectorizer cli options.
Copy link
Collaborator

@jgpruitt jgpruitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding docker compose? If this is just an example, maybe it should be put in the examples directory?

@jgpruitt jgpruitt self-requested a review October 15, 2024 15:46
Comment on lines +70 to +71
COPY . .
RUN make install
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may cause issues with the existing developer experience. Also, if you're going to do this, you have to do RUN make build-install.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it because we are not providing a Dockerfile that once it's built it contains the extension installed. This was the closes thing, it has everything except the extension installed.

One option is to replace this with the timescale-ha image once that contains the extension installed.

Why would you think it would cause issues? The way I was thinking is that we install on container creation, but then uses can just make changes and re-install with the workflow you wrote in the docs.

About the why adding docker-compose. Many projects do it as way to provide a way to run things locally. Granted we can do that with build.py, installing the extension and the vectorizer. This provides a more "real world" scenario, since each component runs separately, instead of in the same container.

Also, a docker-compose file is something most people are familiar with and can easily wrap their minds around it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to go with docker compose, that's fine, but we need all the tooling to work with it. We should pick ONE way and support it fully. I don't want multiple ways that work slightly differently and incompletely. For example, make psql-shell does not work with this docker compose setup.

Base automatically changed from vectorizer to main October 24, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants