Skip to content

Commit 360f639

Browse files
committed
fix concurrently running fastapi and python lg platform
1 parent c5c984d commit 360f639

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

typescript-sdk/apps/dojo/scripts/prep-dojo-everything.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ const langgraphFastapi = {
6262
command: 'poetry install',
6363
name: 'LG FastAPI',
6464
cwd: path.join(integrationsRoot, 'langgraph/examples/python'),
65+
env: {
66+
POETRY_VIRTUALENVS_IN_PROJECT: "false"
67+
}
6568
}
6669

6770
// Langgraph (Platorm {typescript})

typescript-sdk/apps/dojo/scripts/run-dojo-everything.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ const langgraphFastapi = {
6464
command: 'poetry run dev',
6565
name: 'LG FastAPI',
6666
cwd: path.join(integrationsRoot, 'langgraph/examples/python'),
67-
env: {PORT: 8004},
67+
env: {
68+
PORT: 8004,
69+
POETRY_VIRTUALENVS_IN_PROJECT: "false"
70+
},
6871
}
6972

7073
// Langgraph (Platform {python})

typescript-sdk/integrations/langgraph/examples/python/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,17 @@ poetry install
1717
poetry run dev
1818
```
1919

20+
Note that when running them both concurrently, poetry and the langgraph-cli will step on eachothers toes and install/uninstall eachothers dependencies.
21+
You can fix this by running the poetry commands with virtualenvs.in-project set to false. You can set this permanently for the project using:
22+
`poetry config virtualenvs.create false --local`, globally using `poetry config virtualenvs.create false`, or temporarily using an environment variable:
23+
24+
```
25+
export POETRY_VIRTUALENVS_IN_PROJECT=false
26+
poetry install
27+
poetry run dev
28+
```
29+
or
30+
```
31+
POETRY_VIRTUALENVS_IN_PROJECT=false poetry install
32+
POETRY_VIRTUALENVS_IN_PROJECT=false poetry run dev
33+
```

0 commit comments

Comments
 (0)