localGPT icon indicating copy to clipboard operation
localGPT copied to clipboard

Docker Compose Enhancements for LocalGPT Deployment

Open tosin2013 opened this issue 1 year ago • 1 comments

Docker Compose Enhancements for LocalGPT Deployment

Key Improvements:

  • Streamlined LocalGPT API and UI Deployment: This update simplifies the process of simultaneously deploying the LocalGPT API and its user interface using a single Docker Compose file.
  • Flexible Device Utilization: Users can now conveniently choose between CPU or GPU devices (if available) by setting the DEVICE_TYPE environment variable.
  • Customizable Source Documents: The SOURCE_DOCUMENTS environment variable enables effortless specification of the directory containing source documents for LocalGPT to process.
  • Efficient Volume Mounting: The configuration maps local cache and source document directories to corresponding container paths, ensuring data persistence and accessibility.
  • Network Configuration: A dedicated network, localgpt-network, facilitates seamless communication between the API and UI containers.

Key Changes:

  • Structure: The Docker Compose file is now organized into two distinct services:
    • localgpt: Responsible for building and running the LocalGPT API container.
    • localgpt-ui: Manages the construction and execution of the LocalGPT UI container.
  • Environment Variables: The introduction of DEVICE_TYPE and SOURCE_DOCUMENTS variables empowers users to tailor the deployment to their specific requirements.
  • Volume Mounting: The configuration ensures persistence of cache and source documents.
  • Network: The establishment of a dedicated network streamlines communication between the services.

tosin2013 avatar Jan 09 '24 22:01 tosin2013

Thanks @tosin2013 for this fix. I forked your repo and was trying to run on local but for some reason "localgpt" doesn't run on any port, only "localgpt-localgpt-ui" runs on 5111 And when I submit query from chat UI i get "Internal server error"

Any suggestions appreciated, thanks in advance.

Screenshot 2024-03-22 at 16 32 26

sandykadam avatar Mar 22 '24 16:03 sandykadam