Gen AI on OpenShift Series — Episode 1

Generative AI (GenAI) in the real world on powerful platforms

Bobby Johns
7 min readAug 28, 2023

Authors: Bobby Johns, David Kypuros, and Jason Nagin

Series Introduction

In this series, we will be offering our practical advice on implementing Generative AI (GenAI) solutions using containers (Podman) and on a container orchestration platform (OpenShift). In this series, we will cover:

  1. Introduction to Generative AI and Containerization with Podman and OpenShift
  2. Preparing Your AI Lab Environment with Podman and OpenShift
  3. Building Generative AI Containers with Podman
  4. Setting Up a Vector Database with Podman and OpenShift
  5. Leveraging LangChain and CamelK for Business Value
  6. Business Benefits of the AI Lab Environment

In this 6 part series, we will incorporate practical examples, code snippets, and best practices throughout the articles. Additionally, we will emphasize the importance of a well-structured AI lab environment in achieving business objectives, showcasing how each component contributes to these goals.

OpenShift by Red Hat

Episode 1: Introduction to Generative AI and Containerization with Podman and OpenShift

The world of Generative AI (GenAI) promises to be a great new business tool. Imagine a world where AI/ML isn’t just a statistics and forecasting engine, but more like your personal team of interns, researching new ideas, designs, and solutions. It’s not dark magic or science fiction; it’s Generative AI, and it’s about to give businesses a force multiplier in ways they’ve never imagined.

Generative AI: The Creative Spark

Generative AI is like your Picasso, your Shakespeare, your Socrates, all rolled into one digital wizard. It doesn’t just follow orders; it generates content — art, ideas, text — that’s fresh, innovative, and sometimes downright mind-blowing.

Why containers and why Podman?

In the realm of Generative AI, containerization is the linchpin that ensures efficiency, consistency, and scalability. Containers can encapsulate the entire AI ecosystem, from the model and its dependencies to the data and configuration, into self-contained units. This packaging ensures that AI models can be seamlessly moved between development and production environments, guaranteeing consistent performance.

Podman is a daemonless, open source, Linux native tool designed to make it easy to find, run, build, share and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.

Podman can run containers without a container platform, for example in a far-edge deployment where resources are scarce and the network is limited.

Now, why Podman? Podman is a stellar choice for running AI models within containers. Unlike some other container tools, it doesn’t rely on a central daemon, which means it’s lightweight and efficient. Podman can run containers without a container platform, for example in a far-edge deployment where resources are scarce and the network is limited. Pods/Containers are stopped/started/restarted with systemd, just like other Linux services. Podman also integrates smoothly with existing container technologies like Kubernetes and OpenShift, making it an adaptable choice for AI practitioners. With Podman, you gain the agility and control necessary to harness the full power of GenAI, transforming your AI ambitions into real-world achievements.

If you are completely new to containers, and Podman, we recommend that you check out the Introduction.

Why do I need a container platform like OpenShift?

Using OpenShift in the context of Generative AI offers several compelling advantages:

Enterprise-Grade Container Orchestration: OpenShift is designed for enterprise-level container orchestration. It provides robust tools for deploying, managing, and scaling containers in production environments. When you’re dealing with resource-intensive Generative AI models, the ability to orchestrate containers effectively becomes crucial for maintaining performance and reliability.

Developers can focus on building and improving AI models rather than getting bogged down in infrastructure concerns.

http://developers.redhat.com

Developer Productivity: OpenShift provides developer-friendly tools and workflows. Developers can focus on building and improving AI models rather than getting bogged down in infrastructure concerns. Features like developer self-service, continuous integration/continuous deployment (CI/CD) pipelines, and application templates streamline the development process.

Security is paramount when handling AI models, especially if they involve sensitive data.

Coding samples and project frameworks for engineering and development

Enhanced Security and Compliance: Security is paramount when handling AI models, especially if they involve sensitive data. OpenShift includes built-in security features such as role-based access control (RBAC), image scanning, and network policies. These features help ensure that your Generative AI containers are protected against potential vulnerabilities and comply with industry regulations.

Application Scaling and Load Balancing: Generative AI workloads often require dynamic scaling to handle varying workloads. OpenShift excels at automatic scaling based on resource utilization and provides load-balancing capabilities to distribute traffic efficiently. This ensures that your AI applications remain responsive and available even during peak usage.

Data integration and development tools OTB

Seamless Integration with Kubernetes Ecosystem: OpenShift is built on top of Kubernetes, which is widely used for container orchestration. This means you can leverage the rich Kubernetes ecosystem, including Helm charts, operators, and monitoring tools, to enhance your Generative AI deployments. It simplifies the process of integrating additional components into your AI pipeline.

Support and Community: OpenShift benefits from a strong community and robust support from Red Hat. This means you have access to extensive documentation, troubleshooting resources, and a community of experts who can assist with any issues you encounter during your Generative AI journey.

OpenShift offers the enterprise-grade infrastructure and tools necessary to deploy and manage Generative AI workloads at scale. Its security, scalability, and integration capabilities make it an excellent choice for organizations looking to maximize the potential of GenAI while minimizing operational risks.

Business Applications: Turning Creativity into Currency

In practical terms, consider your marketing department equipped with an AI-driven natural language generation (NLG) tool, swiftly composing persuasive product descriptions with machine-like efficiency. Visualize your design team complemented by an AI image generation system, instantly producing captivating visuals. Envision the potential as Generative AI collaborates with your data, enabling real-time market forecasting, fine-grained customer personalization, and automated trend analysis.

GenAI can help you slash costs by automating repetitive tasks, streamline your operations with intelligent decision-making, and reduce the risk of human error.

But wait, there’s more! Generative AI isn’t just about revenue. It can help you slash costs by automating repetitive tasks, streamline your operations with intelligent decision-making, and reduce the risk of human error. It’s a game-changer for businesses of all sizes, from startups to enterprises.

So, in this series, we’re not just going to show you how to set up Gen AI in containers using Podman and OpenShift; hopefully, we’re going to inspire you to unleash the magic of AI for your business goals, helping you increase revenue, cut costs, and reduce risk. Buckle up, because your business is about to get a whole lot more creative, efficient, and profitable!

Dual Aspects of Generative AI and AI/ML

We should note the distinction between two approaches in model training: one where models are trained on all available data (resulting in large, challenging-to-attribute models) like OpenAI & ChatGPT, and another where models are specialized for specific domains. We also should stress the importance of maintaining discipline in tracking changes made to the models, data, and results.

As an example, there are specific GenAI & AI/ML projects, such as Ansible Lightspeed, which involved collaboration by Red Hat with IBM WatsonX. In this project, they focused on creating AI capabilities tailored for generating specific types of content, in this case, Ansible playbooks. Unlike general AI models, this project aimed to be highly specialized to suit Ansible users' needs for infrastructure automation. This requires domain-specific information that may even be private or proprietary information. That’s the model creation, but how do you maintain that model over time as data and best practices change.

As part of the “open source way” of collaboration and innovation, it is very desirable to partner with other people and even companies, to enhance the model/platform’s capabilities. Collaboration is key. You will not be able to move forward fast enough going it alone.

Collaboration is key. You will not be able to move forward fast enough going it alone.

Gen AI on OpenShift — Episode 1 Summary

  • Introduced a series of 6 parts with practical advice on implementing Generative AI (GenAI) solutions using containers (Podman) and OpenShift container orchestration.
  • Covered the series topics such as the Introduction to Generative AI, Preparing an AI lab environment, Building a Large Language Model Container with Podman, and Setting up a Vector Database with Podman and OpenShift.
  • Episode 1 introduces Generative AI as a powerful tool for businesses, highlighting its creative potential and real-world applications.
  • Explained why containers, particularly Podman, are crucial for managing AI workloads efficiently, offering lightweight, decentralized container management with the ability to run containers without a container platform.
  • Further discussed the need for a container platform like OpenShift in the context of Generative AI, emphasizing advantages such as enterprise-grade container orchestration, developer productivity, enhanced security and compliance, application scaling, seamless Kubernetes ecosystem integration, and strong community support.
  • Highlighted the practical business applications of Generative AI, including revenue generation, cost reduction through automation, streamlined operations, and reduced human error, making it valuable for businesses of all sizes.

Next in the Series — Generative AI on OpenShift Series — Episode 2 Preparing Your AI Lab Environment with Podman and OpenShift

Episode 2 Topics:

  • Selecting appropriate hardware and software for your AI lab.
  • Install and configure Podman and OpenShift to create a secure and scalable environment.
  • Discuss the role of a robust lab environment in achieving business goals.

Helpful links:

Red Hat Developers Website — Excellent source for developers of all stripes. Great articles and focus on creating something useful in a short amount of time.

Podman — Everything you need to run Podman on your local development system, be it Linux, Windows, or Mac OS.

OpenShift, OpenShift AI/ML, and OpenShift Data Science — Power tools for container orchestration and building business tools that provide a competitive advantage.

Epic discussion of GenAI on OpenShift 4. by David Kypuros, Bobby Johns, and Jason Nagin.

--

--

Bobby Johns

Life-long technology geek. Husband of one. Father of two. Open Source Enthusiast and Enterprise Architect