Description
I am currently using langraph studio woriking for one of my project using the repo datavisualization_langgraph trying to integrate Google BigQuery into the LangGraph project as a replacement for SQLite. After making necessary modifications to the backend files, I encounter an error when executing docker compose up for setting up the backend.
During the Docker build process, the following error is encountered:
failed to solve: process "/bin/sh -c PYTHONDONTWRITEBYTECODE=1 pip install -c /api/constraints.txt -e /deps/" did not complete successfully: exit code: 1
ERROR: /deps/ is not a valid editable requirement. It should either be a path to a local project or a VCS URL.
• OS: macOS Sonoma V 14.6.1
• Docker version: Docker Engine v27.2.0
I have modified my backend_py and frontend to include Google BigQuery libraries and updated the requirements.txt as per the needs for Google BigQuery integration. Below are the excerpts from the backend_py and other relevant configuration details:
➣ Installed relevant dependencies
➣ Made changes in .env file to support bigquery
➣ Created a BigQueryManager.py file insted of DatabaseManager.py file to handle bigquery
here's BigQueryManager.py file
from google.cloud import bigquery
class BigQueryManager:
def init(self):
self.client = bigquery.Client()
def execute_query(self, query: str):
query_job = self.client.query(query)
results = query_job.result()
return [dict(row.items()) for row in results]
def get_schema(self, dataset_id: str, table_id: str):
dataset_ref = self.client.dataset(dataset_id)
table_ref = dataset_ref.table(table_id)
table = self.client.get_table(table_ref)
return [{"name": field.name, "type": field.field_type} for field in table.schema]
➣ Modified SQLagent.py file
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import JsonOutputParser
from my_agent.BigQueryManager import BigQueryManager
from my_agent.LLMManager import LLMManager
Also changed db manager as bigquery instead of SQLlite
I would appreciate guidance on how to correctly specify the path or configure the Docker environment so that the build process successfully recognizes and installs the required packages from /deps/*. Any suggestions on alternative approaches or corrections in the Backend file would also be highly beneficial.