Skip to content

Commit eab7032

Browse files
committed
Install latest version of Redis for notebook
1 parent 91d51f3 commit eab7032

File tree

3 files changed

+811
-570
lines changed

3 files changed

+811
-570
lines changed

python-recipes/vector-search/02_hybrid_search.ipynb

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
]
6363
},
6464
{
65-
"cell_type": "code",
66-
"execution_count": null,
6765
"metadata": {},
66+
"cell_type": "code",
6867
"outputs": [],
68+
"execution_count": null,
6969
"source": [
7070
"# NBVAL_SKIP\n",
7171
"!git clone https://github.com/redis-developer/redis-ai-resources.git temp_repo\n",
@@ -74,60 +74,62 @@
7474
]
7575
},
7676
{
77-
"cell_type": "markdown",
7877
"metadata": {},
78+
"cell_type": "markdown",
7979
"source": [
80-
"### Install Redis Stack\n",
80+
"### Install Redis\n",
8181
"\n",
82-
"Later in this tutorial, Redis will be used to store, index, and query vector\n",
83-
"embeddings and full text fields. **We need to have a Redis\n",
84-
"instance available.**\n",
82+
"For this tutorial you will need a running instance of Redis if you don't already have one.\n",
8583
"\n",
8684
"#### Local Redis\n",
87-
"Use the shell script below to download, extract, and install [Redis Stack](https://redis.io/docs/getting-started/install-stack/) directly from the Redis package archive."
85+
"Use the shell script below to download, extract, and install [Redis](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/apt/) directly from the Redis package archive for a Linux environment."
8886
]
8987
},
9088
{
91-
"cell_type": "code",
92-
"execution_count": null,
9389
"metadata": {},
90+
"cell_type": "code",
9491
"outputs": [],
92+
"execution_count": 20,
9593
"source": [
9694
"# NBVAL_SKIP\n",
9795
"%%sh\n",
96+
"sudo apt-get install lsb-release curl gpg\n",
9897
"curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg\n",
98+
"sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg\n",
9999
"echo \"deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main\" | sudo tee /etc/apt/sources.list.d/redis.list\n",
100-
"sudo apt-get update > /dev/null 2>&1\n",
101-
"sudo apt-get install redis-stack-server > /dev/null 2>&1\n",
102-
"redis-stack-server --daemonize yes"
100+
"sudo apt-get update\n",
101+
"sudo apt-get install redis\n",
102+
"\n",
103+
"redis-server --version\n",
104+
"redis-server --daemonize yes --loadmodule /usr/lib/redis/modules/redisearch.so"
103105
]
104106
},
105107
{
106-
"cell_type": "markdown",
107108
"metadata": {},
109+
"cell_type": "markdown",
108110
"source": [
109111
"#### Alternative Redis Access (Cloud, Docker, other)\n",
110112
"There are many ways to get the necessary redis-stack instance running\n",
111113
"1. On cloud, deploy a [FREE instance of Redis in the cloud](https://redis.com/try-free/). Or, if you have your\n",
112114
"own version of Redis Enterprise running, that works too!\n",
113115
"2. Per OS, [see the docs](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/)\n",
114-
"3. With docker: `docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest`"
116+
"3. With docker: `docker run -d --name redis -p 6379:6379 redis:latest`"
115117
]
116118
},
117119
{
118-
"cell_type": "markdown",
119120
"metadata": {},
121+
"cell_type": "markdown",
120122
"source": [
121123
"### Define the Redis Connection URL\n",
122124
"\n",
123125
"By default this notebook connects to the local instance of Redis Stack. **If you have your own Redis Enterprise instance** - replace REDIS_PASSWORD, REDIS_HOST and REDIS_PORT values with your own."
124126
]
125127
},
126128
{
127-
"cell_type": "code",
128-
"execution_count": 1,
129129
"metadata": {},
130+
"cell_type": "code",
130131
"outputs": [],
132+
"execution_count": null,
131133
"source": [
132134
"import os\n",
133135
"import warnings\n",

0 commit comments

Comments
 (0)