mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
8fdf88b8e3
This PR fixes the error `ModuleNotFoundError: No module named 'langchain.cli'` Fixes https://github.com/hwchase17/langchain/issues/5833 (issue)
19 lines
541 B
Python
19 lines
541 B
Python
"""Script to run langchain-server locally using docker-compose."""
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
from langchainplus_sdk.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()
|