Skip to content

Commit 4ec38b8

Browse files
committed
refactor(repo): reorganize repository structure into apps/ and workshops/ directories
- Updated .gitignore to reflect new paths under apps/ subdirectory for various applications - Modified README.md to add Repository Structure section and update all project links to point to correct subdirectories (apps/ for applications, workshops/ for educational materials) - Ensures better organization and clarity for users navigating the DevRel Labs repository
1 parent a1cb787 commit 4ec38b8

File tree

30 files changed

+1232
-809
lines changed

30 files changed

+1232
-809
lines changed

.gitignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ Temporary Items
3232
.csr
3333
.pem
3434

35-
oci-language-translation/config.yaml
36-
oci-subtitle-translation/config.yaml
37-
oci-csv-json-translation/config.yaml
38-
oci-language-multiple-translation/config.yaml
39-
40-
agentic_rag/config.yaml
41-
agentic_rag/chroma_db
42-
agentic_rag/embeddings
35+
apps/oci-language-translation/config.yaml
36+
apps/oci-subtitle-translation/config.yaml
37+
apps/oci-csv-json-translation/config.yaml
38+
apps/oci-language-multiple-translation/config.yaml
39+
40+
apps/agentic_rag/config.yaml
41+
apps/agentic_rag/chroma_db
42+
apps/agentic_rag/embeddings

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
Welcome to DevRel Labs, a collection of AI solutions and tools built with Oracle technologies. This repository contains practical implementations, demos, and guides for various AI use cases.
44

5+
## Repository Structure
6+
7+
- `apps/`: Deployable applications, automation scripts, and infrastructure-as-code projects.
8+
- `workshops/`: Step-by-step guides, LiveLabs content, and educational materials.
9+
- `notebooks/`: Reserved for notebook-driven explorations and tutorials (currently minimal).
10+
511
## 🚀 New AI Solutions (2024)
612

7-
### 1. [Oracle MCP AI Agents](./oracle-mcp-ai-agents/)
13+
### 1. [Oracle MCP AI Agents](./apps/oracle-mcp-ai-agents/)
814
**Building AI Agents with Model Context Protocol (MCP) and Oracle Database 26ai**
915

1016
- **MCP Integration**: Secure tool calling between LLMs and Oracle Database
@@ -13,7 +19,7 @@ Welcome to DevRel Labs, a collection of AI solutions and tools built with Oracle
1319
- **Langflow Integration**: Visual workflow builder for AI agents
1420
- **Use Cases**: Financial advisor, customer service, business intelligence
1521

16-
### 2. [Oracle RAG Applications](./oracle-rag-applications/)
22+
### 2. [Oracle RAG Applications](./apps/oracle-rag-applications/)
1723
**Building RAG Applications with Oracle Database 26ai**
1824

1925
- **Vector Embeddings**: Native vector storage and search
@@ -22,7 +28,7 @@ Welcome to DevRel Labs, a collection of AI solutions and tools built with Oracle
2228
- **LLM Integration**: Seamless integration with various Large Language Models
2329
- **Use Cases**: Knowledge management, customer support, content creation
2430

25-
### 3. [Oracle Select AI Insights](./oracle-select-ai-insights/)
31+
### 3. [Oracle Select AI Insights](./apps/oracle-select-ai-insights/)
2632
**Talk with Industry-Specific Domain Data and Gain Insights Using Select AI**
2733

2834
- **Natural Language Queries**: Ask questions in plain English
@@ -34,27 +40,27 @@ Welcome to DevRel Labs, a collection of AI solutions and tools built with Oracle
3440
## 🔧 Existing Solutions
3541

3642
### AI & Machine Learning
37-
- [Agentic RAG](./agentic_rag/) - AI RAG in a BOX Demo using Oracle AI Database 26ai and Local LLMs
38-
- [PlaneLLM](./planeLLM/) - PlaneLLM integration with Oracle Database
39-
- [Neural Networks Hero](./neural_networks_hero/) - Neural network implementations and tutorials
43+
- [Agentic RAG](./apps/agentic_rag/) - AI RAG in a BOX Demo using Oracle AI Database 26ai and Local LLMs
44+
- [PlaneLLM](./apps/planeLLM/) - PlaneLLM integration with Oracle Database
45+
- [Neural Networks Hero](./workshops/neural_networks_hero/) - Neural network implementations and tutorials
4046

4147
### Computer Vision
4248
- [OCI Vision AI](./oci-vision-ai/) - Computer vision solutions using Oracle Cloud Infrastructure
43-
- [Mask Detection](./mask_detection_training/) - Training and labeling for mask detection models
49+
- [Mask Detection](./workshops/mask_detection_training/) - Training and labeling for mask detection models
4450

4551
### Language & Translation
46-
- [OCI Language Translation](./oci-language-translation/) - Multi-language translation services
47-
- [OCI Subtitle Translation](./oci-subtitle-translation/) - Automated subtitle translation
48-
- [OCI CSV-JSON Translation](./oci-csv-json-translation/) - Data format conversion tools
52+
- [OCI Language Translation](./apps/oci-language-translation/) - Multi-language translation services
53+
- [OCI Subtitle Translation](./apps/oci-subtitle-translation/) - Automated subtitle translation
54+
- [OCI CSV-JSON Translation](./apps/oci-csv-json-translation/) - Data format conversion tools
4955

5056
### Infrastructure & Deployment
51-
- [NVIDIA NIM on OKE](./nvidia-nim-oke/) - NVIDIA Inference Microservices on Oracle Container Engine
52-
- [Holoscan](./holoscan/) - Holoscan applications and deployments
57+
- [NVIDIA NIM on OKE](./apps/nvidia-nim-oke/) - NVIDIA Inference Microservices on Oracle Container Engine
58+
- [Holoscan](./apps/holoscan/) - Holoscan applications and deployments
5359
- [Kubeflow on OKE](./kubeflow-oke-old/) - Machine learning workflows on Kubernetes
5460

5561
### Data & Analytics
56-
- [Data in AI Revolution](./data-in-ai-revolution/) - Data-driven AI solutions and insights
57-
- [RAG in a Box](./rag_in_a_box/) - Retrieval-Augmented Generation solutions
62+
- [Data in AI Revolution](./workshops/data-in-ai-revolution/) - Data-driven AI solutions and insights
63+
- [RAG in a Box](./apps/rag_in_a_box/) - Retrieval-Augmented Generation solutions
5864

5965
## 🚀 Getting Started
6066

apps/agentic_rag/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Here you can find a result of using Chain of Thought (CoT) reasoning:
5050
1. Clone the repository and install dependencies:
5151

5252
```bash
53-
git clone https://github.com/oracle-devrel/devrel-labs.git
54-
cd devrel-labs/agentic_rag
53+
git clone https://github.com/oracle-devrel/ai-solutions.git
54+
cd ai-solutions/apps/agentic_rag
5555
pip install -r requirements.txt
5656
```
5757

apps/agentic_rag/articles/kubernetes_rag.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ Then, we can start setting up the solution in our cluster by following these ste
8585
1. Clone the repository containing the Kubernetes manifests:
8686

8787
```bash
88-
git clone https://github.com/oracle-devrel/devrel-labs.git
89-
cd devrel-labs/agentic_rag/k8s
88+
git clone https://github.com/oracle-devrel/ai-solutions.git
89+
cd ai-solutions/apps/agentic_rag/k8s
9090
```
9191

9292
2. Create a namespace:
@@ -188,4 +188,4 @@ The deployment of this solution requires the following minimum resources:
188188
189189
## Conclusion
190190
191-
You can check out the full AI solution and the deployment options we mention in this article in [the official GitHub repository](https://github.com/oracle-devrel/devrel-labs/tree/main/agentic_rag).
191+
You can check out the full AI solution and the deployment options we mention in this article in [the official GitHub repository](https://github.com/oracle-devrel/ai-solutions/tree/main/apps/agentic_rag).

apps/agentic_rag/k8s/kustom/demo/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ spec:
101101
102102
# Clone and set up the application
103103
cd /app
104-
git clone -b agentic_rag_automation https://github.com/vmleon/devrel-labs.git
105-
cd devrel-labs/agentic_rag
104+
git clone -b "${GIT_BRANCH:-main}" https://github.com/oracle-devrel/ai-solutions.git
105+
cd ai-solutions/apps/agentic_rag
106106
pip install -r requirements.txt
107107
108108
# Move config.yaml file to agentic-rag folder
109-
echo "Copying config.yaml to /app/devrel-labs/agentic_rag/config.yaml"
110-
cp /app/config.yaml /app/devrel-labs/agentic_rag/config.yaml
109+
echo "Copying config.yaml to /app/ai-solutions/apps/agentic_rag/config.yaml"
110+
cp /app/config.yaml /app/ai-solutions/apps/agentic_rag/config.yaml
111111
112112
# Start the Gradio app
113113
echo "Starting Gradio application..."

apps/agentic_rag/k8s/local-deployment/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ spec:
8383
8484
# Clone and set up the application
8585
cd /app
86-
git clone https://github.com/oracle-devrel/devrel-labs.git
87-
cd devrel-labs/agentic_rag
86+
git clone -b "${GIT_BRANCH:-main}" https://github.com/oracle-devrel/ai-solutions.git
87+
cd ai-solutions/apps/agentic_rag
8888
pip install -r requirements.txt
8989
9090
# Start the Gradio app

apps/langgraph_agent_with_genai/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ This blog demonstrates how to index PDF, Images, DOCx or TXT files using Python
7474
2. Let's start indexing the files
7575
2.1 - On your shell machine, get the code and create your .env file
7676
````
77-
git clone https://github.com/oracle-devrel/devrel-labs.git
78-
cd langgraph_agent_with_genai/src
77+
git clone https://github.com/oracle-devrel/ai-solutions.git
78+
cd ai-solutions/apps/langgraph_agent_with_genai/src
7979
## Create your .env file from the template
8080
cp .env_template .env
8181
````
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import subprocess
5+
import configparser
6+
import logging
7+
from datetime import datetime
8+
9+
# Configure logging
10+
logging.basicConfig(
11+
level=logging.INFO,
12+
format='%(asctime)s - %(levelname)s - %(message)s',
13+
filename='log/multi_collection_migration.log'
14+
)
15+
logger = logging.getLogger(__name__)
16+
17+
def get_collections(mongo_url, db_name):
18+
"""Get list of collections from MongoDB"""
19+
from pymongo import MongoClient
20+
client = MongoClient(mongo_url)
21+
db = client[db_name]
22+
return db.list_collection_names()
23+
24+
def update_config(config_file, collection_name):
25+
"""Update config.ini with new collection name"""
26+
config = configparser.ConfigParser()
27+
config.read(config_file)
28+
config['mongodb']['collection'] = collection_name
29+
with open(config_file, 'w') as f:
30+
config.write(f)
31+
32+
def migrate_collection(collection_name):
33+
"""Migrate a single collection"""
34+
logger.info(f"Starting migration of collection: {collection_name}")
35+
try:
36+
# Update config with collection name
37+
update_config('config/config.ini', collection_name)
38+
39+
# Run migration script
40+
result = subprocess.run(
41+
['python', 'mongo2ora_data.py'],
42+
capture_output=True,
43+
text=True,
44+
check=True
45+
)
46+
47+
logger.info(f"Successfully migrated collection: {collection_name}")
48+
logger.debug(f"Migration output: {result.stdout}")
49+
50+
except subprocess.CalledProcessError as e:
51+
logger.error(f"Failed to migrate collection {collection_name}: {e}")
52+
logger.error(f"Error output: {e.stderr}")
53+
raise
54+
except Exception as e:
55+
logger.error(f"Unexpected error during migration of {collection_name}: {e}")
56+
raise
57+
58+
def main():
59+
# Read MongoDB connection details from config
60+
config = configparser.ConfigParser()
61+
config.read('config/config.ini')
62+
63+
mongo_user = config['mongodb']['userid']
64+
mongo_password = config['mongodb']['password']
65+
mongo_host = config['mongodb']['hostname']
66+
mongo_port = config['mongodb']['port']
67+
mongo_db = config['mongodb']['sourcedb']
68+
69+
# Construct MongoDB URL
70+
mongo_url = f"mongodb://{mongo_user}:{mongo_password}@{mongo_host}:{mongo_port}/{mongo_db}"
71+
72+
try:
73+
# Get list of collections
74+
collections = get_collections(mongo_url, mongo_db)
75+
logger.info(f"Found {len(collections)} collections to migrate")
76+
77+
# Migrate each collection
78+
for collection in collections:
79+
logger.info(f"Processing collection: {collection}")
80+
migrate_collection(collection)
81+
82+
logger.info("All collections migrated successfully")
83+
84+
except Exception as e:
85+
logger.error(f"Migration failed: {e}")
86+
raise
87+
88+
if __name__ == "__main__":
89+
main()
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import subprocess
5+
import configparser
6+
import logging
7+
from datetime import datetime
8+
9+
# Configure logging
10+
logging.basicConfig(
11+
level=logging.INFO,
12+
format='%(asctime)s - %(levelname)s - %(message)s',
13+
filename='log/multi_collection_migration.log'
14+
)
15+
logger = logging.getLogger(__name__)
16+
17+
def get_collections(mongo_url, db_name):
18+
"""Get list of collections from MongoDB"""
19+
from pymongo import MongoClient
20+
client = MongoClient(mongo_url)
21+
db = client[db_name]
22+
return db.list_collection_names()
23+
24+
def update_config(config_file, collection_name):
25+
"""Update config.ini with new collection name"""
26+
config = configparser.ConfigParser()
27+
config.read(config_file)
28+
config['mongodb']['collection'] = collection_name
29+
with open(config_file, 'w') as f:
30+
config.write(f)
31+
32+
def migrate_collection(collection_name):
33+
"""Migrate a single collection"""
34+
logger.info(f"Starting migration of collection: {collection_name}")
35+
try:
36+
# Update config with collection name
37+
update_config('config/config.ini', collection_name)
38+
39+
# Run migration script
40+
result = subprocess.run(
41+
['python', 'mongo2ora_data.py'],
42+
capture_output=True,
43+
text=True,
44+
check=True
45+
)
46+
47+
logger.info(f"Successfully migrated collection: {collection_name}")
48+
logger.debug(f"Migration output: {result.stdout}")
49+
50+
except subprocess.CalledProcessError as e:
51+
logger.error(f"Failed to migrate collection {collection_name}: {e}")
52+
logger.error(f"Error output: {e.stderr}")
53+
raise
54+
except Exception as e:
55+
logger.error(f"Unexpected error during migration of {collection_name}: {e}")
56+
raise
57+
58+
def main():
59+
# Read MongoDB connection details from config
60+
config = configparser.ConfigParser()
61+
config.read('config/config.ini')
62+
63+
mongo_user = config['mongodb']['userid']
64+
mongo_password = config['mongodb']['password']
65+
mongo_host = config['mongodb']['hostname']
66+
mongo_port = config['mongodb']['port']
67+
mongo_db = config['mongodb']['sourcedb']
68+
69+
# Construct MongoDB URL
70+
mongo_url = f"mongodb://{mongo_user}:{mongo_password}@{mongo_host}:{mongo_port}/{mongo_db}"
71+
72+
try:
73+
# Get list of collections
74+
collections = get_collections(mongo_url, mongo_db)
75+
logger.info(f"Found {len(collections)} collections to migrate")
76+
77+
# Migrate each collection
78+
for collection in collections:
79+
logger.info(f"Processing collection: {collection}")
80+
migrate_collection(collection)
81+
82+
logger.info("All collections migrated successfully")
83+
84+
except Exception as e:
85+
logger.error(f"Migration failed: {e}")
86+
raise
87+
88+
if __name__ == "__main__":
89+
main()

0 commit comments

Comments
 (0)