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

Support sparsevec in weighted vector search function #328

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG VERSION=15
ARG PGVECTOR_VERSION=0.5.1
ARG PGVECTOR_VERSION=0.6.1
Copy link

Choose a reason for hiding this comment

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

info: Upgraded pgvector from 0.5.1 to 0.6.1. Verify compatibility with the rest of the system.

#fix pg_cron at the latest commit of the time
ARG PG_CRON_COMMIT_SHA=7e91e72b1bebc5869bb900d9253cc9e92518b33f

Expand Down Expand Up @@ -31,7 +31,7 @@ RUN gem install pg -- --with-pg-include=/usr/local/pgsql/include/ --with-pg-lib=
# hack to make sure postgres user has write access to externally mounted volumes
RUN mkdir /lantern_shared && chown postgres:postgres /lantern_shared

RUN cd /root/postgresql-15.5/contrib && make install -j
RUN cd /root/postgresql-15.5/contrib && make install
Copy link

Choose a reason for hiding this comment

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

info: Removed '-j' flag from make install. This might slow down the build process.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this?

Copy link
Contributor Author

@dqii dqii Aug 31, 2024

Choose a reason for hiding this comment

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

440.5 /usr/bin/install -c -m 755  postgres_fdw.so '/usr/local/pgsql/lib/postgres_fdw.so'
440.5 /usr/bin/install -c -m 644 ./postgres_fdw.control '/usr/local/pgsql/share/extension/'
440.6 /usr/bin/install -c -m 644 ./postgres_fdw--1.0.sql ./postgres_fdw--1.0--1.1.sql  '/usr/local/pgsql/share/extension/'
440.6 make[1]: Leaving directory '/root/postgresql-15.5/contrib/postgres_fdw'
------
Dockerfile.dev:34
--------------------
  32 |     RUN mkdir /lantern_shared && chown postgres:postgres /lantern_shared
  33 |     
  34 | >>> RUN cd /root/postgresql-15.5/contrib && make install -j
  35 |     
  36 |     # allow non-root users to install in the container to make it easier to run update-tests
--------------------
ERROR: failed to solve: process "/bin/sh -c cd /root/postgresql-15.5/contrib && make install -j" did not complete successfully: exit code: 2

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/ojyc3i59rx9nve3a7qeqpdid7
diqi@Dis-Laptop lantern % 

The error I get with -j


# allow non-root users to install in the container to make it easier to run update-tests
RUN chmod -R 777 /usr/local/pgsql/lib/ /usr/local/pgsql/share/extension/ /usr/local/pgsql/include/server/
Expand All @@ -55,7 +55,7 @@ COPY . .
RUN sudo rm -rf build \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Debug .. \
&& cmake .. \
Copy link

Choose a reason for hiding this comment

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

info: Removed '-DCMAKE_BUILD_TYPE=Debug'. This changes the build type from Debug to default (usually Release). Ensure this is intentional and won't affect development workflows.

Copy link
Contributor

Choose a reason for hiding this comment

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

why change this?

The dockerfile is meant for development and I often use GDB from inside it, so having a build with symbols is often good.

Though, I usually attach a folder from host and rebuild the DB for debugging so not a big deal but would still like to know why the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The build did not succeed for me without it

&& make -j install

# Install benchmarking tools in build folder
Expand All @@ -65,7 +65,7 @@ RUN git clone https://github.com/lanterndata/benchmark build/benchmark \
&& pip install -r external/requirements.txt

# Install perf
RUN sudo apt update && sudo apt install -y linux-tools-common linux-tools-generic linux-tools-`uname -r`
RUN sudo apt update && sudo apt install -y linux-tools-common linux-tools-generic
Copy link

Choose a reason for hiding this comment

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

info: Removed 'linux-tools-uname -r'. This might cause issues if specific kernel version tools are needed.

# in host, enable perf_event paranoid via
# echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid

Expand Down
Loading
Loading