From 230b138afb1b1df8280756f0e74d8929722caa01 Mon Sep 17 00:00:00 2001 From: Rowe Wilson Frederisk Holme Date: Thu, 22 Sep 2022 02:19:21 +0800 Subject: [PATCH 1/4] Wrong default host name --- copilot_proxy/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copilot_proxy/app.py b/copilot_proxy/app.py index 8871c12..9a3b481 100644 --- a/copilot_proxy/app.py +++ b/copilot_proxy/app.py @@ -8,7 +8,7 @@ from models import OpenAIinput from utils.codegen import CodeGenProxy codegen = CodeGenProxy( - host=os.environ.get("TRITON_HOST", "localhost"), + host=os.environ.get("TRITON_HOST", "triton"), port=os.environ.get("TRITON_PORT", 8001), verbose=os.environ.get("TRITON_VERBOSITY", False) ) From be98f54e51ed8bf593e03e56813f758bff0154c2 Mon Sep 17 00:00:00 2001 From: Rowe Wilson Frederisk Holme Date: Thu, 22 Sep 2022 02:20:58 +0800 Subject: [PATCH 2/4] Update example.env --- example.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example.env b/example.env index 7c24e92..7031e06 100644 --- a/example.env +++ b/example.env @@ -1,4 +1,4 @@ -TRITON_HOST=localhost +TRITON_HOST=triton TRITON_PORT=8001 API_HOST=0.0.0.0 -API_PORT=5000 \ No newline at end of file +API_PORT=5000 From 9cf72d3666206e98a544474fd109b94831a0a2a9 Mon Sep 17 00:00:00 2001 From: Rowe Wilson Frederisk Holme Date: Thu, 22 Sep 2022 02:28:47 +0800 Subject: [PATCH 3/4] Fix `uvicorn` undefined error This also alleviates #61. --- docker-compose.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 2fa268c..c8e5e7d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -18,13 +18,16 @@ services: count: all capabilities: [gpu] copilot_proxy: - image: moyix/copilot_proxy:latest + # For dockerhub version + # image: moyix/copilot_proxy:latest + # command: python3 -m flask run --host=0.0.0.0 --port=5000 # For local build -# build: -# context: . -# dockerfile: copilot_proxy/Dockerfile - command: uvicorn app:app --host $API_HOST --port $API_PORT + build: + context: . + dockerfile: copilot_proxy/Dockerfile + command: uvicorn app:app --host 0.0.0.0 --port 5000 env_file: - - .env + # You can modify this env file to configure your proxy environment + - example.env ports: - "5001:${API_PORT}" From 5ffbaa817879133a1882785856ba34f9fe44e167 Mon Sep 17 00:00:00 2001 From: Rowe Wilson Frederisk Holme Date: Thu, 22 Sep 2022 04:12:44 +0800 Subject: [PATCH 4/4] Maintain compatibility with previous versions --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index c8e5e7d..4e7a5b1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -30,4 +30,4 @@ services: # You can modify this env file to configure your proxy environment - example.env ports: - - "5001:${API_PORT}" + - "5000:5000"