Skip to content

Example of running LangChain on Cloud Run

License

Notifications You must be signed in to change notification settings

jj-nilbodee/gcp-langchain

 
 

Repository files navigation

digitalocean-langchain

Boilerplate for deploying LangChain on Digitalocean App Platform

Installation and running locally

  1. Create and activate a virtual environment

    virtualenv MY_ENV
    source MY_ENV/bin/activate
  2. Install packages with pip

    cd ad-gpt
    pip install -r requirements.txt
  3. Set up your .env file

    • Duplicate .env.example to .env
  4. Run the project

    flask --app run app

Deploying to Google Cloud Run, requires CloudSDK and Google Cloud Project with billing enabled

  1. Use Google builds command to create the docker image in the container registry

    gcloud builds submit --tag gcr.io/PROJECT_ID/langchain
  2. Create a Cloud Run service

    gcloud run deploy --image gcr.io/PROJECT_ID/langchain --timeout=300 --platform managed
  3. Verify the deployed cloud run service in the Google Cloud Console

About

Example of running LangChain on Cloud Run

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.6%
  • Dockerfile 8.4%