Skip to content

Commit

Permalink
chore: isolated python environment for phoenix serve (#5063)
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang authored Oct 17, 2024
1 parent 2e9f276 commit 95748e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
"test:e2e:ui": "playwright test --ui",
"dev": "pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite",
"dev:ui": "pnpm run build:static && pnpm run build:relay && vite",
"dev:server": "source .env && python -m phoenix.server.main --dev serve",
"dev:server": "source .env && tox r -e phoenix_main -- --dev serve",
"dev:server:test": "node ./tests/utils/testServer.mjs",
"dev:server:init": "python -m phoenix.server.main --dev serve --with-trace-fixtures=llama_index_rag --with-projects=demo_llama_index --force-fixture-ingestion",
"dev:server:init": "tox r -e phoenix_main -- --dev serve --with-trace-fixtures=llama_index_rag --with-projects=demo_llama_index --force-fixture-ingestion",
"typecheck": "tsc --noEmit",
"lint": "eslint ./src",
"prettier": "prettier --write './src/**/*'",
Expand Down
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,15 @@ allowlist_externals =
commands =
unlink evals
unlink otel

[testenv:phoenix_main]
pass_env=
PHOENIX_PORT
PHOENIX_GRPC_PORT
PHOENIX_HOST_ROOT_PATH
PHOENIX_SQL_DATABASE_URL
PHOENIX_SQL_DATABASE_SCHEMA
commands_pre =
uv tool install --compile-bytecode --reinstall-package arize-phoenix arize-phoenix@.
commands =
uv tool run arize-phoenix {posargs:serve}

0 comments on commit 95748e0

Please sign in to comment.