|
62 | 62 | ] |
63 | 63 | }, |
64 | 64 | { |
65 | | - "cell_type": "code", |
66 | | - "execution_count": null, |
67 | 65 | "metadata": {}, |
| 66 | + "cell_type": "code", |
68 | 67 | "outputs": [], |
| 68 | + "execution_count": null, |
69 | 69 | "source": [ |
70 | 70 | "# NBVAL_SKIP\n", |
71 | 71 | "!git clone https://github.com/redis-developer/redis-ai-resources.git temp_repo\n", |
|
74 | 74 | ] |
75 | 75 | }, |
76 | 76 | { |
77 | | - "cell_type": "markdown", |
78 | 77 | "metadata": {}, |
| 78 | + "cell_type": "markdown", |
79 | 79 | "source": [ |
80 | | - "### Install Redis Stack\n", |
| 80 | + "### Install Redis\n", |
81 | 81 | "\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", |
85 | 83 | "\n", |
86 | 84 | "#### 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." |
88 | 86 | ] |
89 | 87 | }, |
90 | 88 | { |
91 | | - "cell_type": "code", |
92 | | - "execution_count": null, |
93 | 89 | "metadata": {}, |
| 90 | + "cell_type": "code", |
94 | 91 | "outputs": [], |
| 92 | + "execution_count": 20, |
95 | 93 | "source": [ |
96 | 94 | "# NBVAL_SKIP\n", |
97 | 95 | "%%sh\n", |
| 96 | + "sudo apt-get install lsb-release curl gpg\n", |
98 | 97 | "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", |
99 | 99 | "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" |
103 | 105 | ] |
104 | 106 | }, |
105 | 107 | { |
106 | | - "cell_type": "markdown", |
107 | 108 | "metadata": {}, |
| 109 | + "cell_type": "markdown", |
108 | 110 | "source": [ |
109 | 111 | "#### Alternative Redis Access (Cloud, Docker, other)\n", |
110 | 112 | "There are many ways to get the necessary redis-stack instance running\n", |
111 | 113 | "1. On cloud, deploy a [FREE instance of Redis in the cloud](https://redis.com/try-free/). Or, if you have your\n", |
112 | 114 | "own version of Redis Enterprise running, that works too!\n", |
113 | 115 | "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`" |
115 | 117 | ] |
116 | 118 | }, |
117 | 119 | { |
118 | | - "cell_type": "markdown", |
119 | 120 | "metadata": {}, |
| 121 | + "cell_type": "markdown", |
120 | 122 | "source": [ |
121 | 123 | "### Define the Redis Connection URL\n", |
122 | 124 | "\n", |
123 | 125 | "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." |
124 | 126 | ] |
125 | 127 | }, |
126 | 128 | { |
127 | | - "cell_type": "code", |
128 | | - "execution_count": 1, |
129 | 129 | "metadata": {}, |
| 130 | + "cell_type": "code", |
130 | 131 | "outputs": [], |
| 132 | + "execution_count": null, |
131 | 133 | "source": [ |
132 | 134 | "import os\n", |
133 | 135 | "import warnings\n", |
|
0 commit comments