Files
langchain/langchain/server.py
Zander Chase bee136efa4 Update Tracing Walkthrough (#4760)
Add client methods to read / list runs and sessions.

Update walkthrough to:
- Let the user create a dataset from the runs without going to the UI
- Use the new CLI command to start the server

Improve the error message when `docker` isn't found
2023-05-16 13:26:43 +00:00

19 lines
533 B
Python

"""Script to run langchain-server locally using docker-compose."""
import subprocess
from pathlib import Path
from langchain.cli.main import get_docker_compose_command
def main() -> None:
"""Run the langchain server locally."""
p = Path(__file__).absolute().parent / "docker-compose.yaml"
docker_compose_command = get_docker_compose_command()
subprocess.run([*docker_compose_command, "-f", str(p), "pull"])
subprocess.run([*docker_compose_command, "-f", str(p), "up"])
if __name__ == "__main__":
main()