Browse Source

circle tail logs

Alex Cheema 7 months ago
parent
commit
ab333ea55f
1 changed files with 9 additions and 2 deletions
  1. 9 2
      .circleci/config.yml

+ 9 - 2
.circleci/config.yml

@@ -29,14 +29,21 @@ commands:
             # Start first instance
             HF_HOME="$(pwd)/.hf_cache_node1" DEBUG_DISCOVERY=7 DEBUG=7 exo --inference-engine <<parameters.inference_engine>> \
               --node-id "node1" --listen-port 5678 --broadcast-port 5679 --chatgpt-api-port 8000 \
-              --chatgpt-api-response-timeout 900 --disable-tui 2>&1 | stdbuf -oL tee output1.log &
+              --chatgpt-api-response-timeout 900 --disable-tui > output1.log &
             PID1=$!
+            tail -f output1.log &
+            TAIL1=$!
 
             # Start second instance
             HF_HOME="$(pwd)/.hf_cache_node2" DEBUG_DISCOVERY=7 DEBUG=7 exo --inference-engine <<parameters.inference_engine>> \
               --node-id "node2" --listen-port 5679 --broadcast-port 5678 --chatgpt-api-port 8001 \
-              --chatgpt-api-response-timeout 900 --disable-tui 2>&1 | stdbuf -oL tee output2.log &
+              --chatgpt-api-response-timeout 900 --disable-tui > output2.log &
             PID2=$!
+            tail -f output2.log &
+            TAIL2=$!
+
+            # Remember to kill the tail processes at the end
+            trap 'kill $TAIL1 $TAIL2' EXIT
 
             # Wait for discovery
             sleep 10