I will preface this by saying that I am inexperienced with docker and docker-compose. I am trying to convert my docker run ...
command to a docker-compose.yml file, however, I cannot get the models.config file to be found.
I am able to correctly run a tensorflow-serving docker container using the following docker run ...
command:
docker run -t --rm \
tensorflow/serving \
-p 8501:8501 \
-v "$(pwd)/models/:/models/" \
--model_config_file=/models/models.config \
--model_config_file_poll_wait_seconds=60
This works as expected, and the models.config file is found in the container at /models/models.config
as expected.
The tensorflow-serving pages do not mention anything about docker-compose, however, I would much rather use this than a docker run ...
command. My attempt at a docker-compose file is:
version: '3.3'
services:
server:
image: tensorflow/serving
ports:
- '8501:8501'
volumes:
- './models:/models'
environment:
- 'model_config_file=/models/models.config'
- 'model_config_file_poll_wait_seconds=60'
Using this docker-compose file, the container runs, however, it seems like the environment variables are completely ignored, so I'm not sure if this is how I should set them. The container image looks in the default location for the models.config file, and it doesn't exist there, and so it does not load the configuration defined in models.config.
So, how can I define these values, or run a tensorflow-serving container, using docker-compose?
I appreciate any help.
Thanks
environment: model_config_file: /models/models.config
– Crumplecommand
section. – Osteitis