title: Serving multiple tensorflow models using docker
body: <p>Having seen <a href="https://github.com/tensorflow/serving/issues/1077" rel="noreferrer">this</a> github issue and <a href="https://stackoverflow.com/questions/45749024/how-can-i-use-tensorflow-serving-for-multiple-models">this</a> stackoverflow post I had hoped this would simply work.</p>
  
  <p>It seems as though passing in the environment variable <code>MODEL_CONFIG_FILE</code> has no affect. I am running this through <code>docker-compose</code> but I get the same issue using <code>docker-run</code>.</p>
  
  <hr>
  
  <p>The error:</p>
  
  <pre><code>I tensorflow_serving/model_servers/server.cc:82] Building single TensorFlow model file config:  model_name: model model_base_path: /models/model
  I tensorflow_serving/model_servers/server_core.cc:461] Adding/updating models.
  I tensorflow_serving/model_servers/server_core.cc:558]  (Re-)adding model: model
  E tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:369] FileSystemStoragePathSource encountered a file-system access error: Could not find base path /models/model for servable model
  </code></pre>
  
  <hr>
  
  <p>The Dockerfile</p>
  
  <pre><code>FROM tensorflow/serving:nightly
  
  COPY ./models/first/ /models/first
  COPY ./models/second/ /models/second
  
  COPY ./config.conf /config/config.conf
  
  ENV MODEL_CONFIG_FILE=/config/config.conf
  </code></pre>
  
  <hr>
  
  <p>The compose file</p>
  
  <pre><code>version: '3'
  
  services:
    serving:
      build: .
      image: testing-models
      container_name: tf
  </code></pre>
  
  <hr>
  
  <p>The config file</p>
  
  <pre><code>model_config_list: {
    config: {
      name:  "first",
      base_path:  "/models/first",
      model_platform: "tensorflow",
      model_version_policy: {
          all: {}
      }
    },
    config: {
      name:  "second",
      base_path:  "/models/second",
      model_platform: "tensorflow",
      model_version_policy: {
          all: {}
      }
    }
  }
  </code></pre>