You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you can run the application locally, you must use the Jupyter Notebook in the `data/` directory to create product embeddings and product metadata JSON files. Both files will end up stored in the `data/` directory. Then you can proceed with one or both of the options below.
61
+
## Running the App
62
+
Before running the app, install [Docker Desktop](https://www.docker.com/products/docker-desktop/).
63
+
64
+
66
65
67
-
###Using pre-built containers
66
+
#### Redis Cloud (recommended)
68
67
69
-
The easiest option to run locally is to use the following docker-compose file to launch the
70
-
prebuilt container hosted on GitHub.
68
+
1.[Get your Redis Cloud Database](https://app.redislabs.com/) (if needed).
71
69
72
-
```yaml
73
-
version: '3.7'
74
-
services:
70
+
2. Export Redis Endpoint Environment Variables:
71
+
```bash
72
+
$ export REDIS_HOST=your-redis-host
73
+
$ export REDIS_PORT=your-redis-port
74
+
$ export REDIS_PASSOWRD=your-redis-password
75
+
```
75
76
76
-
redis-vector-db:
77
-
image: redis/redis-stack:latest
78
-
ports:
79
-
- 6379:6379
80
-
- 8001:8001
77
+
3. Run the App:
78
+
```bash
79
+
$ docker compose -f docker-cloud-redis.yml up
80
+
```
81
81
82
-
backend:
83
-
image: ghcr.io/spartee/redis-vss-fashion:v0.2.0
84
-
environment:
85
-
DEPLOYMENT: "dev"
86
-
REDIS_DATA_URL: 'redis://redis-vector-db:6379'
87
-
REDIS_OM_URL: 'redis://redis-vector-db:6379'
88
-
REDIS_HOST: 'redis-vector-db'
89
-
REDIS_PORT: 6379
90
-
expose:
91
-
- "8888"
92
-
ports:
93
-
- "8888:8888"
94
-
depends_on:
95
-
- "redis-vector-db"
82
+
> The benefit of this approach is that the db will persist beyond application runs. So you can make updates and re run the app without having to provision the dataset or create another search index.
96
83
84
+
#### Redis Docker
85
+
```bash
86
+
$ docker compose -f docker-local-redis.yml up
97
87
```
98
88
99
-
To launch, run the following
100
-
-``docker compose up --build`` in same directory as ``docker-compose.yml``
101
-
- Wait while things install and get setup
102
-
- Navigate to `http://localhost:8888` in a browser
89
+
### Customizing (optional)
90
+
You can use the Jupyter Notebook in the `data/` directory to create product embeddings and product metadata JSON files. Both files will end up storedinthe `data/`directory and used when creating your own container.
91
+
92
+
Create your own containers using the `build.sh` script and then make sure to update the `.yml` file with the right image name.
103
93
104
-
### Using a React development env
105
-
It's typically easier to write front end code in an interactive environment (**outside of Docker**)where one can test out code changes in real time. In order to use this approach:
106
94
107
-
1. Follow steps from previous section with Docker Compose to deploy the backend API.
108
-
2. Skip the step about launching a browser at host/port.
109
-
3.`cd gui/` directory and use `yarn` to install packages: `yarn install --no-optional` (you may need to use `npm` to install `yarn`).
110
-
4. Use `yarn` to serve the application from your machine: `yarn start`.
95
+
### Using a React development env
96
+
It's typically easier to write front end code in an interactive environment, testing changes in realtime.
97
+
98
+
1. Deploy the app using steps above.
99
+
2. Install NPM packages (you may need to use `npm` to install `yarn`)
100
+
```bash
101
+
$ cd gui/
102
+
$ yarn install --no-optional
103
+
````
104
+
4. Use `yarn` to serve the application from your machine
105
+
```bash
106
+
$ yarn start
107
+
```
111
108
5. Navigate to `http://localhost:3000` in a browser.
112
109
110
+
All changes to your local code will be reflected in your display in semi realtime.
111
+
113
112
### Troubleshooting
113
+
Sometimes you need to clear out some Docker cached artifacts. Run `docker system prune`, restart Docker Desktop, and try again.
114
114
115
-
#### Issues building the container
116
-
- Sometimes it works if you try again. Or maybe you need to clear out some Docker cache. Run `docker system prune`, restart Docker Desktop, and try again.
117
-
- The generated `node_modules` folder (under `gui/` when running the app outside of Docker) can mess things up when building docker images. Delete that folder (if present) and try rebuilding again.
115
+
Open an issue here on GitHub and we will try to be responsive to these. Additionally, please consider [contributing](CONTRIBUTING.md).
0 commit comments