Home > Net >  translate docker run command (tensorflow-serving) into docker-compose
translate docker run command (tensorflow-serving) into docker-compose

Time:10-01

Here is the docker run command:

docker run -p 8501:8501 \
--name tfserving_classifier \
-e MODEL_NAME=img_classifier \
-t tensorflow/serving

Here is what I tried but I am not able to get the MODEL_NAME to work

  tensorflow-servings:
    container_name: tfserving_classifier
    ports:
      - 8501:8501
    command:
      - -e MODEL_NAME=img_classifier
      - -t tensorflow/serving

CodePudding user response:

  tensorflow-servings:
    container_name: tfserving_classifier
    image: tensorflow/serving
    environment:
      - MODEL_NAME=img_classifier
    ports:
      - 8501:8501
  • Related