@@ -41,10 +41,12 @@ test() {
4141
4242 if [[ -f $1 /test.py ]]; then
4343
44- DOCKER_NET_NAME=azimuth-llm-shared
45- if [[ ! $( docker network ls | grep $DOCKER_NET_NAME ) ]]; then
46- docker network create $DOCKER_NET_NAME
47- fi
44+ DOCKER_NET_NAME=host
45+
46+ # DOCKER_NET_NAME=azimuth-llm-shared
47+ # if [[ ! $(docker network ls | grep $DOCKER_NET_NAME) ]]; then
48+ # docker network create $DOCKER_NET_NAME
49+ # fi
4850
4951 # Ensure app image is available
5052 IMAGE=$( image_name $1 ) :$IMAGE_TAG
@@ -56,13 +58,15 @@ test() {
5658 fi
5759
5860 # Ensure Ollama instance is available
59- if [[ $( curl -s localhost:11434) == " Ollama is running" ]]; then
60- log " Using existing ollama process running on localhost:11434"
61- else
62- log " Ollama process not running - starting containerised server"
63- docker run --rm --network $DOCKER_NET_NAME -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
64- sleep 3
65- docker exec ollama ollama pull smollm2:135m
61+ if [[ $( curl -s localhost:11434) != " Ollama is running" ]]; then
62+ log " Ollama not running on localhost:11434 - aborting test"
63+ exit 1
64+ # log "Using existing ollama process running on localhost:11434"
65+ # else
66+ # log "Ollama process not running - starting containerised server"
67+ # docker run --rm --network $DOCKER_NET_NAME -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
68+ # sleep 3
69+ # docker exec ollama ollama pull smollm2:135m
6670 fi
6771
6872 log " Starting Gradio app container"
@@ -72,17 +76,23 @@ test() {
7276 sleep 10
7377
7478 log " Running tests"
79+ # docker run --network $DOCKER_NET_NAME --rm \
80+ # --name $1-test-suite \
81+ # -e GRADIO_URL=http://$1-app:7860 --entrypoint python \
82+ # $IMAGE \
83+ # test.py
7584 docker run --network $DOCKER_NET_NAME --rm \
7685 --name $1 -test-suite \
77- -e GRADIO_URL=http:// $1 -app:7860 - -entrypoint python \
86+ --entrypoint python \
7887 $IMAGE \
7988 test.py
8089
8190 log " Removing containers:"
82- docker rm -f ollama $1 -app
91+ # docker rm -f ollama $1-app
92+ docker rm -f $1 -app
8393
84- log " Removing docker network:"
85- docker network rm $DOCKER_NET_NAME
94+ # log "Removing docker network:"
95+ # docker network rm $DOCKER_NET_NAME
8696
8797 echo
8898 echo " ----- Tests succeed -----"
0 commit comments