File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ test() {
47
47
if [[ -f $1 /test.py ]]; then
48
48
49
49
# Ensure app image is available
50
- IMAGE_NAME =$( image_name $1 )
50
+ IMAGE =$( image_name $1 ) : $IMAGE_TAG
51
51
if [[ $IMAGE_TAG == " latest" ]]; then
52
52
build $1
53
53
else
54
- log " Pulling image $IMAGE_NAME : $IMAGE_TAG "
55
- docker pull $IMAGE_NAME : $IMAGE_TAG
54
+ log " Pulling image $IMAGE "
55
+ docker pull $IMAGE
56
56
fi
57
57
58
58
# Ensure Ollama instance is available
@@ -66,13 +66,17 @@ test() {
66
66
fi
67
67
68
68
log " Starting Gradio app container"
69
- docker run --network $DOCKER_NET_NAME -d --name $1 -app $IMAGE_NAME
69
+ docker run --network $DOCKER_NET_NAME -d --name $1 -app $IMAGE
70
70
71
71
# Give the app time to start
72
72
sleep 3
73
73
74
74
log " Running tests"
75
- docker run --network $DOCKER_NET_NAME --rm --name $1 -test-suite -e GRADIO_URL=http://$1 -app:7860 --entrypoint python $IMAGE_NAME test.py
75
+ docker run --network $DOCKER_NET_NAME --rm \
76
+ --name $1 -test-suite \
77
+ -e GRADIO_URL=http://$1 -app:7860 --entrypoint python \
78
+ $IMAGE \
79
+ test.py
76
80
77
81
log " Removing containers:"
78
82
docker rm -f ollama $1 -app
You can’t perform that action at this time.
0 commit comments