Setup | Running the Project | Notebooks | Project Structure | Implementation Details
This project uses Docker Compose to set up a complete environment for running Java-based AI applications with RedisVL. The environment includes:
- A Jupyter Notebook server with Java kernel support
- Redis (includes built-in search, vector, and JSON capabilities)
- RedisVL library built from source
- Pre-installed dependencies for AI/ML workloads
- Docker and Docker Compose
- OpenAI API key (for notebooks that use OpenAI services - optional)
- Create a
.envfile in the project root (optional for OpenAI-based examples):
OPENAI_API_KEY=your_openai_api_key_hereQuick Start: See the main README for simplified instructions.
-
Navigate to the notebooks directory:
cd notebooks -
Start the Docker containers:
docker compose up -d
-
Access the Jupyter environment:
- Open your browser and navigate to http://localhost:8888
- No authentication is required (token/password disabled for local development)
-
Access RedisInsight (optional):
- Open your browser and navigate to http://localhost:8001
- Connect to Redis using the following details:
- Host: redis
- Port: 6379
- No password (unless configured)
-
When finished, stop the containers:
docker compose down
| Notebook | Description | Status |
|---|---|---|
| 01_getting_started.ipynb | Introduction to RedisVL basic concepts and usage | ✅ |
| 02_hybrid_queries.ipynb | Demonstrates hybrid search capabilities combining vector and text queries | ✅ |
| 05_hash_vs_json.ipynb | Comparison of Redis Hash vs JSON storage types for vector data | ✅ |
| 11_advanced_queries.ipynb | TextQuery, HybridQuery, AggregateHybridQuery, and MultiVectorQuery | ✅ |
notebooks/
├── .env # Environment variables (optional)
├── docker-compose.yml # Docker Compose configuration
├── jupyter/ # Jupyter configuration files
│ ├── Dockerfile # Dockerfile for Jupyter with Java kernel
│ ├── environment.yml # Conda environment specification
│ ├── install.py # Java kernel installation script
│ └── java/ # Java dependencies and configuration
│ └── pom.xml # Maven project file with dependencies
├── resources/ # Data files for notebooks
│ └── sample_data.json # Sample datasets for examples
└── *.ipynb # Jupyter notebooksThe project uses JJava, a Jupyter kernel for Java based on JShell. This allows for interactive Java development in Jupyter notebooks.
Key components:
- Java 21 for modern Java features
- Maven for dependency management
- JJava kernel for Jupyter integration
- RedisVL built from source
The notebooks showcase how to use RedisVL capabilities with Redis:
- RedisVL: Java port of the Redis Vector Library
- Redis Vector Store: Used for storing and querying vector embeddings
- Search Indexes: For building vector similarity search applications
- Hybrid Queries: Combining vector and traditional search
The Docker setup includes:
-
Jupyter Container:
- Based on minimal Jupyter notebook image
- Adds Java 21, Maven, and the JJava kernel
- Builds RedisVL from source and includes it in classpath
- Includes Python environment for utilities
-
Redis Container:
- Uses Redis image with built-in search and vector capabilities
- Persists data using Docker volumes
- Exposes Redis on port 6379 and RedisInsight on port 8001
After starting the environment, begin with the 01_getting_started.ipynb notebook to learn the basics of RedisVL, then explore the other notebooks to see advanced features and use cases.
Each notebook is self-contained and includes explanations of the concepts being demonstrated along with runnable code examples.