Skip to content

Repository files navigation

My apologies, since those tools were not mentioned in the Docker documentation you provided, I did not include them in the README. However, if you are using Neo4j, Ollama, and LangChain in your generative AI application, I can update the README to reflect that. Here's an updated version that includes those tools:

Containerized Generative AI Application

This repository contains a containerized generative AI application built using Python, the Hugging Face Transformers library, Neo4j, Ollama, and LangChain. The application is packaged and deployed using Docker, ensuring consistent and reproducible environments across different systems.

Prerequisites

  • Docker installed on your machine
  • Python 3.7 or later

Getting Started

  1. Clone the repository:
git clone https://github.com/JaynouOliver/docker.git
  1. Navigate to the project directory:
cd docker
  1. Build the Docker image:
docker build -t generative-ai-app .
  1. Run the Docker container:
docker run -p 8000:8000 generative-ai-app

This will start the containerized application and map the container's port 8000 to the host's port 8000.

  1. Access the application by visiting http://localhost:8000 in your web browser.

Application Overview

This generative AI application uses the Hugging Face Transformers library, Neo4j graph database, Ollama language model, and LangChain framework to perform natural language processing tasks, such as text generation, summarization, and question answering. The application is built using Python and Flask as the web framework.

Key Components

  • Hugging Face Transformers: A state-of-the-art library for natural language processing tasks, providing pre-trained models and utilities for fine-tuning and deployment.
  • Neo4j: A graph database used for storing and querying complex, interconnected data.
  • Ollama: A large language model trained on a diverse corpus of data, used for natural language generation and understanding tasks.
  • LangChain: A framework for building applications with large language models, providing utilities for memory management, data manipulation, and task execution.
  • Flask: A lightweight Python web framework used for building the application's API and serving the generated content.
  • Docker: A containerization platform used to package the application and its dependencies into a reproducible and portable container image.

Containerization

The application is containerized using Docker, allowing for easy deployment and scaling across different environments. The Dockerfile in the repository defines the steps to build the container image, including installing dependencies, copying the application code, and specifying the command to run the application.

# Use the official Python image as the base image
FROM python:3.9

# Set the working directory
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

# Install the dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application code
COPY . .

# Expose the port the app runs on
EXPOSE 8000

# Start the application
CMD ["python", "app.py"]

To build the Docker image, run:

docker build -t generative-ai-app .

To run the containerized application, use:

docker run -p 8000:8000 generative-ai-app

Contributing

Contributions are welcome! Please follow the standard GitHub workflow:

  1. Fork the repository
  2. Create a new branch for your feature or bug fix
  3. Commit your changes
  4. Push your changes to your forked repository
  5. Submit a pull request

License

This project is licensed under the MIT License.

About

docker

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages