mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-05-14 21:28:04 +02:00
use raw controller
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
echo "Cleaning up processes..."
|
||||
|
||||
# Kill the monitoring process if it exists
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e # Exit on error
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
echo "Waiting for API to be ready..."
|
||||
max_attempts=10
|
||||
attempt=1
|
||||
@@ -8,7 +10,7 @@ attempt=1
|
||||
while [ $attempt -le $max_attempts ]; do
|
||||
echo "Health check attempt $attempt of $max_attempts..."
|
||||
if curl -s -f -i http://localhost:9999/ > logs/health_check_$attempt.log 2>&1; then
|
||||
echo "Health check succeeded!"
|
||||
echo "Health check succeeded"
|
||||
break
|
||||
else
|
||||
echo "Health check failed, waiting 5 seconds..."
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Don't use set -e here as we want to capture and handle errors ourselves
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
# Make sure garak report directory exists
|
||||
GARAK_REPORTS_DIR="/home/runner/.local/share/garak/garak_runs"
|
||||
mkdir -p $GARAK_REPORTS_DIR
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e # Exit on error
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
echo "Starting API server with logging..."
|
||||
nohup python -m src.api.server > logs/api.log 2>&1 &
|
||||
API_PID=$!
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
echo "Starting system monitoring..."
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
# Read API PID from file
|
||||
API_PID=$(cat api_pid.txt)
|
||||
echo "Monitoring API process with PID: $API_PID"
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e # Exit on error
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
echo "Making API request..."
|
||||
curl -X POST -i http://localhost:9999/api/conversations \
|
||||
-d '{ "prompt": "describe a random planet in our solar system in 10 words or less" }' \
|
||||
-H "Content-Type: application/json" > logs/test_request.log 2>&1
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Test API request failed!"
|
||||
echo "Test API request failed"
|
||||
cat logs/test_request.log
|
||||
exit 1
|
||||
else
|
||||
echo "Test API request succeeded!"
|
||||
echo "Test API request succeeded"
|
||||
cat logs/test_request.log
|
||||
fi
|
||||
Reference in New Issue
Block a user