Skip to content

Disable CPU-specific optimizations #10

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

Merged
merged 2 commits into from
Mar 28, 2025
Merged
Changes from all commits
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
9 changes: 7 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -22,6 +22,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Determine the branch suffix, if any
run: |
echo "DOCKER_BRANCH_SUFFIX=-${GITHUB_HEAD_REF}" >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

@@ -41,5 +46,5 @@ jobs:
HYPOPG_VERSION=${{env.HYPOPG_VERSION}}
PGVECTOR_VERSION=${{env.PGVECTOR_VERSION}}
platforms: linux/amd64,linux/arm64
tags: ghcr.io/zapgram/pilot-postgres:${{env.POSTGRES_VERSION}}-hypopg${{env.HYPOPG_VERSION}}-pgvector${{env.PGVECTOR_VERSION}}
push: ${{ github.ref_name == 'trunk' }}
tags: ghcr.io/zapgram/pilot-postgres:${{env.POSTGRES_VERSION}}-hypopg${{env.HYPOPG_VERSION}}-pgvector${{env.PGVECTOR_VERSION}}${{env.DOCKER_BRANCH_SUFFIX}}
push: ${{ github.ref_name == 'trunk' || env.DOCKER_BRANCH_SUFFIX != '' }}
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -20,7 +20,11 @@ ARG PGVECTOR_VERSION
RUN cd /tmp \
&& git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git \
&& cd pgvector \
&& make \
# Disable CPU-specific optimizations since the CPU we're building on might
# not be the same as what we're running in CI or development
#
# ref: https://github.com/pgvector/pgvector/issues/143
&& make OPTFLAGS="" \
&& make install \
&& cd /tmp \
&& rm -rf /tmp/pgvector