-
Notifications
You must be signed in to change notification settings - Fork 1
Docker base image
Model server images are based on the leapbeyondgroup/catwalk
base image, built from the Dockerfile
in the root of this repo.
This image sets up the python environment, pre-installs the catwalk
package, and set the RNG model as the default model to serve.
To build and push this image, use the build script:
$ ./build.sh
This will build and push the base image.
If you don't want to push the base image, use ./build.sh false
instead.
You should see latest: digest
or Successfully tagged
messages at the end,depending on if you pushed or not.
The base image includes all the examples and serves the rng example model by default, providing an out-of-the-box example to play with.
$ docker run --rm -p 9090:9090 ${DOCKER_TAG}
You can serve any example model by setting the MODEL_PATH
environment variable:
$ docker run --rm -p 9090:9090 --env MODEL_PATH=catwalk/example_models/batch ${DOCKER_TAG}
You should see INFO in app: Initialised model
at the end.
By default, the catwalk serve
command will run the test-model
and test-server
tests before starting up. This has the advantage that a server will not start unless the tests pass, but can also slow startup time, especially if your model provides a lot of test cases.
To disable the tests, simply set RUN_TESTS=false
.
$ docker run --rm -p 9090:9090 --env RUN_TESTS=false ${DOCKER_TAG}
Copyright 2020 Leap Beyond Emerging Technologies B.V. (CC BY 4.0 )