Skip to content

Commit

Permalink
Merge branch 'main' into optimize-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowplum committed May 25, 2024
2 parents 0e71804 + 1c5cf7b commit 3b76e08
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 21 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/readme-check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Check Markdown links

on: push

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: yes

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apps are written in Python. The available apps are:
## Prerequisites
You don't have to know Aerospike to get started, but you do need the following:

1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](./prism-image-search/README.md#setup-python-virtual-environment)).
1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](#setup-python-virtual-environment)).
1. The URL to your private sandbox environment (this will be provided).

## Development
Expand Down
4 changes: 2 additions & 2 deletions basic-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vector record insertion, and basic ANN query against the AVS server using the Py

## Prerequisites

1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](./prism-image-search/README.md#setup-python-virtual-environment)).
1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](../prism-image-search/README.md#setup-python-virtual-environment)).
1. An Aerospike Vector Search host (sandbox or local).

## Setup build Python Virtual Environment
Expand All @@ -21,7 +21,7 @@ source .venv/bin/activate
## Install dependencies

```shell
python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
python3 -m pip install -r requirements.txt
```

```
Expand Down
16 changes: 10 additions & 6 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Aerospike Proximus Docker Compose
# Aerospike Vector Search (AVS) Docker Compose

## Prerequisite
Locate valid `features.conf` in the `./config` directory:

## Installation Aerospike and Proximus Clusters (docker-compose)
> [!IMPORTANT]
> If you are running MacOS you will need to replace all occurrences of port 5000 with
> port 5002 in your docker compose file and aerospike-proximus.yml file.
## Installation Aerospike and AVS Clusters (docker-compose)
```shell
docker compose -f docker-compose.yaml up -d
```
## Installation Aerospike and Proximus Clusters (as separate docker images)
## Installation Aerospike and AVS Clusters (as separate docker images)
## Create Docker Network
```shell
docker network create svc
Expand All @@ -21,15 +25,15 @@ docker run -d \
-v ./config:/etc/aerospike aerospike/aerospike-server-enterprise:7.0.0.5 \
--config-file /etc/aerospike/aerospike.conf
```
## Run Proximus Cluster
## Run AVS Cluster
```shell
docker run -d \
--name aerospike-proximus \
--name aerospike-vs \
--network svc \
-p 5000:5000 \
-p 5040:5040 \
-v ./config:/etc/aerospike-proximus \
aerospike/aerospike-proximus:0.3.1
aerospike/aerospike-proximus:0.4.0
```


2 changes: 1 addition & 1 deletion docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
networks:
- svc
aerospike-proximus:
image: aerospike/aerospike-proximus:0.3.1
image: aerospike/aerospike-proximus:0.4.0
container_name: "aerospike-proximus"
depends_on:
aerospike-cluster:
Expand Down
2 changes: 1 addition & 1 deletion prism-image-search/Dockerfile-prism
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update \
RUN mkdir /prism
COPY ./prism /prism
WORKDIR /prism
RUN python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
RUN python3 -m pip install -r requirements.txt

ENTRYPOINT ["waitress-serve"]
CMD ["--host=0.0.0.0", "--port=8080", "--threads=32", "prism:app"]
17 changes: 12 additions & 5 deletions prism-image-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Aerospike Vector Search (AVS) performs Approximate Nearest Neighbor(ANN) search
## Prerequisites
You don't have to know Aerospike to get started, but you do need the following:

1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](./prism-image-search/README.md#setup-python-virtual-environment)).
1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](./README.md#setup-python-virtual-environment)).
1. An Aerospike Vector Search host (preview environment or local).

## Configure AVS host
Expand All @@ -28,22 +28,28 @@ cd prism

Install dependencies using requirements.text
```shell
python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
python3 -m pip install -r requirements.txt
```
## Link your photos
To index your local photos, create a symlink to a location with photos directory.

```shell
ln -s ~/Pictures prism/static/images/data
ln -s ~/Pictures static/images/data
```
## Start the application

> [!IMPORTANT]
> If you did not use an virtualenv when installing dependencies `waitress-serve` will
> likely not be in your path.
```shell
waitress-serve --host 127.0.0.1 --port 8080 --threads 32 prism:app
```

## Performing an image search
Navigate to http://127.0.0.1:8080 and perform a search for images based on a description.
<!-- markdown-link-check-disable-next-line -->
Navigate to http://127.0.0.1:8080 and perform a search for images based on a
description.


## Install using docker compose
Expand Down Expand Up @@ -86,7 +92,8 @@ source .venv/bin/activate
### Install dependencies

```shell
python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
cd prism
python3 -m pip install -r requirements.txt
```

### Configuration
Expand Down
2 changes: 1 addition & 1 deletion quote-semantic-search/Dockerfile-quote-search
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update \
RUN mkdir /quote-search
COPY ./quote-search /quote-search
WORKDIR /quote-search
RUN python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
RUN python3 -m pip install -r requirements.txt

ENTRYPOINT ["waitress-serve"]
CMD ["--host=0.0.0.0", "--port=8080", "--threads=32", "quote_search:app"]
14 changes: 10 additions & 4 deletions quote-semantic-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Aerospike Vector Search (AVS) performs Approximate Nearest Neighbor(ANN) search
## Prerequisites
You don't have to know Aerospike to get started, but you do need the following:

1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](./prism-image-search/README.md#setup-python-virtual-environment)).
1. A Python 3.10 - 3.11 environment and familiarity with the Python programming language (see [Setup Python Virtual Environment](../prism-image-search/README.md#setup-python-virtual-environment)).
1. An Aerospike Vector Search host (preview or local).

## Configure AVS host
Expand All @@ -29,16 +29,21 @@ cd quote-search

Install dependencies using requirements.text
```shell
python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
python3 -m pip install -r requirements.txt
```
## Start the application

> [!IMPORTANT]
> If you did not use an virtualenv when installing dependencies `waitress-serve` will
> likely not be in your path.
```shell
waitress-serve --host 127.0.0.1 --port 8080 --threads 32 quote_search:app
```

## Performing a quote search
Navigate to http://127.0.0.1:8080/search and perform a search for quotes based on a description.
<!-- markdown-link-check-disable-next-line -->
Navigate to http://127.0.0.1:8080/search and perform a search for quotes based on a description.


## Install using docker compose
Expand Down Expand Up @@ -81,7 +86,8 @@ source .venv/bin/activate
### Install dependencies

```shell
python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple
cd quote-search
python3 -m pip install -r requirements.txt
```

### Configuration
Expand Down

0 comments on commit 3b76e08

Please sign in to comment.