Skip to content

Instantly share code, notes, and snippets.

@masroorhasan
Last active November 6, 2020 03:28
Show Gist options
  • Save masroorhasan/7508a405869af11c0a1b6994d59bb6d6 to your computer and use it in GitHub Desktop.
Save masroorhasan/7508a405869af11c0a1b6994d59bb6d6 to your computer and use it in GitHub Desktop.
#!/bin/bash
USER=$1
TAG=$2
TF_SERVING_VERSION_GIT_BRANCH="r1.13"
git clone --branch="${TF_SERVING_VERSION_GIT_BRANCH}" https://github.com/tensorflow/serving
TF_SERVING_BUILD_OPTIONS="--copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.1 --copt=-msse4.2"
cd serving && \
docker build --pull -t $USER/tensorflow-serving-devel:$TAG \
--build-arg TF_SERVING_VERSION_GIT_BRANCH="${TF_SERVING_VERSION_GIT_BRANCH}" \
--build-arg TF_SERVING_BUILD_OPTIONS="${TF_SERVING_BUILD_OPTIONS}" \
-f tensorflow_serving/tools/docker/Dockerfile.devel .
cd serving && \
docker build -t $USER/tensorflow-serving:$TAG \
--build-arg TF_SERVING_BUILD_IMAGE=$USER/tensorflow-serving-devel:$TAG \
-f tensorflow_serving/tools/docker/Dockerfile .
@Arnold1
Copy link

Arnold1 commented Feb 14, 2020

@Mustufain were you able to fix your issue? how did you solve it? what are your settings for TF_SERVING_BUILD_OPTIONS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment