I've solved this with the following command
docker run --gpus all -p 8080:8080 -v "$(pwd)/test_input.json:/test_input.json" ${IMAGE_REPO}
This command will start the endpoint, run the test, and then terminate automatically. Make sure to place the test_input.json file in your local directory.