Environments

The Phoenix app can be run in various notebook environments such as colab and SageMaker as well as be served via the terminal or a docker container

Notebooks

To start phoenix in the notebook environment, run:

import phoenix as px

session = px.launch_app()

This will start a local Phoenix server. You can initialize the phoenix server with various kinds of data (traces, inferences). Check out the API for details

When running phoenix in the notebook, by default it does not persist your data.

Container

Container images are still actively being worked on. If you are interested in hosted phoenix, please get in touch!

Phoenix server images are available via Docker Hub. The hosted phoenix server runs as a trace collector and can be used if you want observability for LLM traces via docker compose or simply want a long-running phoenix instance. Below are examples of how to run phoenix va Docker for a specific version.

First pull the image you want to run (note you can use the tag latest if you would just like the latest version)

docker pull arizephoenix/phoenix:version-2.9.3

Now you can run the image you pulled (note you must expose the port 6006 so you can view the UI).

docker run -p 6006:6006 arizephoenix/phoenix:version-2.9.3

The Phoenix UI will be available at localhost:6006.

If you deploy the phoenix server (collector) to a remote machine, you will have to make sure to configure the remote endpoint as the collector endpoint. (This feature is only available after phoenix 1.3.x)

import os

os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "http://123.456.789:6006"

Note that the above is only necessary if your application is running in a Jupyter notebook. If you are trying to deploy your application and have phoenix collect traces via a container, please consult the deployment guide.

Terminal

If you want to start a phoenix server to collect traces, you can also run phoenix directly from the command line

python3 -m phoenix.server.main serve

This will start the phoenix server on port 6006. If you are running your instrumented notebook or application on the same machine, traces should automatically be exported to http://127.0.0.1:6006 so no additional configuration is needed. However if the server is running remotely, you will have to modify the environment variable PHOENIX_COLLECTOR_ENDPOINT to point to that machine (e.g. http://<my-remote-machine>:<port>)

Note that this command has various configuration options such as --host and --port. For example:

python3 -m phoenix.server.main --port 1234 --host 0.0.0.0 serve

Last updated