langchain-ai / langgraph-studio

Desktop app for prototyping and debugging LangGraph applications locally.
https://studio.langchain.com
1.97k stars 131 forks source link

Mount a folder to the docker image #75

Closed lfnovo closed 2 months ago

lfnovo commented 3 months ago

Hello, is it possible to mount a local volume to the docker app that is built by Langgraph?

hwchase17 commented 3 months ago

all folders that are in the directory you open should be mounted, are you seeing otherwise?

danmas0n commented 3 months ago

I am also kind of stuck on this -- basically my agent graph needs to operate on a codebase so I need both my tool and the codebase itself to be in the container, and be able to run test suites on both, that sort of thing. I added both codebases as dependencies as a way to force them both to load but not ideal. I shelled into the Docker container and confirmed nothing was mounted externally.

I could do most of what I need to do if the directory that contains langgraph.json was mounted to the container, but ideally I also want the ability for agents to "npm run test", either inside or outside the container. I don't think you can pull this off with the two mechanisms you expose right now (Dockerfile or docker-compose.yml) but if you have any relevant samples that would be awesome...

dqbd commented 2 months ago

Hello! You can use the docker_compose_file entry with the following contents to mount folders to the API image

langgraph.json

{ "docker_compose_file": "./docker-compose.extend.yml" }

docker-compose.extend.yml

services:
  langgraph-api:
    volumes:
      - ./static:/raw/static

This will work locally within LangGraph Studio, but won't work when deployed in LangGraph Cloud.