diff --git a/MANIFEST.in b/MANIFEST.in index 056c0caca..2f10ef0de 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ #include the license file include LICENSE.txt include README.md +include VERSION.txt diff --git a/NoopBenchDockerfile b/NoopBenchDockerfile index a0f71b733..3f10ff53a 100644 --- a/NoopBenchDockerfile +++ b/NoopBenchDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} COPY containers/python/noop_container.py /container/ COPY bench/setup_noop_bench_docker.sh /bench/ diff --git a/NoopDockerfile b/NoopDockerfile index e79424bdc..23f3e5b8f 100644 --- a/NoopDockerfile +++ b/NoopDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} MAINTAINER Dan Crankshaw diff --git a/PySparkContainerDockerfile b/PySparkContainerDockerfile index 27e4b2c49..ba514b243 100644 --- a/PySparkContainerDockerfile +++ b/PySparkContainerDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} MAINTAINER Dan Crankshaw @@ -14,6 +15,7 @@ RUN curl -o /spark.tgz https://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-had COPY containers/python/pyspark_container.py containers/python/pyspark_container_entry.sh /container/ COPY clipper_admin/ /lib/clipper_admin/ +COPY VERSION.txt /lib/ ENV SPARK_HOME="/spark" diff --git a/PythonContainerDockerfile b/PythonContainerDockerfile index de2f1e919..b86c4a382 100644 --- a/PythonContainerDockerfile +++ b/PythonContainerDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} MAINTAINER Dan Crankshaw @@ -9,6 +10,7 @@ RUN conda install -y --file /lib/python_container_conda_deps.txt COPY containers/python/python_container.py containers/python/python_container_entry.sh /container/ COPY clipper_admin/ /lib/clipper_admin/ +COPY VERSION.txt /lib/ CMD ["/container/python_container_entry.sh"] diff --git a/RPythonDockerfile b/RPythonDockerfile index 261573b86..264b1e1e5 100644 --- a/RPythonDockerfile +++ b/RPythonDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} ## Use Debian unstable via pinning -- new style via APT::Default-Release RUN echo "deb http://http.debian.net/debian sid main" > /etc/apt/sources.list.d/debian-unstable.list \ diff --git a/SklearnCifarDockerfile b/SklearnCifarDockerfile index d56e5d11e..96218cd22 100644 --- a/SklearnCifarDockerfile +++ b/SklearnCifarDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} MAINTAINER Dan Crankshaw diff --git a/SumBenchDockerfile b/SumBenchDockerfile index a79a70896..584a70a30 100644 --- a/SumBenchDockerfile +++ b/SumBenchDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} COPY containers/python/sum_container.py /container/ COPY bench/setup_sum_bench_docker.sh /bench/ diff --git a/SumDockerfile b/SumDockerfile index 4bb0448c8..5d5d68629 100644 --- a/SumDockerfile +++ b/SumDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} COPY containers/python/sum_container.py /container/ diff --git a/TensorFlowCifarDockerfile b/TensorFlowCifarDockerfile index 09a3a6e8e..2db4fd63f 100644 --- a/TensorFlowCifarDockerfile +++ b/TensorFlowCifarDockerfile @@ -1,4 +1,5 @@ -FROM clipper/py-rpc:latest +ARG CODE_VERSION=0.2-rc1 +FROM clipper/py-rpc:${CODE_VERSION} MAINTAINER Dan Crankshaw diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 000000000..6563189c5 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +develop diff --git a/bench/build_bench_docker_images.sh b/bench/build_bench_docker_images.sh index f3b4a63ec..9e1e94d78 100755 --- a/bench/build_bench_docker_images.sh +++ b/bench/build_bench_docker_images.sh @@ -10,9 +10,12 @@ unset CDPATH # the script. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + # Let the user start this script from anywhere in the filesystem. cd $DIR/.. +tag=$( ]" exit 1 @@ -20,16 +23,18 @@ fi # Build the Clipper Docker images # Assume local clipper/py-rpc base image (if exists) or pulled image is correct + +docker build -t clipper/py-rpc:$tag -f ./RPCDockerfile ./ if [ $# -eq 0 ]; then - time docker build -t clipper/sum-bench -f SumBenchDockerfile ./ - time docker build -t clipper/noop-bench -f NoopBenchDockerfile ./ + time docker build build --build-arg CODE_VERSION=$tag -t clipper/sum-bench:$tag -f SumBenchDockerfile ./ + time docker build build --build-arg CODE_VERSION=$tag -t clipper/noop-bench:$tag -f NoopBenchDockerfile ./ else echo $1 echo $2 echo $3 echo $4 - time docker build -t clipper/sum-bench -f SumBenchDockerfile ./ --build-arg MODEL_NAME="$1" --build-arg MODEL_VERSION="$2" - time docker build -t clipper/noop-bench -f NoopBenchDockerfile ./ --build-arg MODEL_NAME="$3" --build-arg MODEL_VERSION="$4" + time docker build build --build-arg CODE_VERSION=$tag -t clipper/sum-bench:$tag -f SumBenchDockerfile ./ --build-arg MODEL_NAME="$1" --build-arg MODEL_VERSION="$2" + time docker build build --build-arg CODE_VERSION=$tag -t clipper/noop-bench:$tag -f NoopBenchDockerfile ./ --build-arg MODEL_NAME="$3" --build-arg MODEL_VERSION="$4" fi cd - diff --git a/bin/build_docker_images.sh b/bin/build_docker_images.sh index c9956b86e..c3cb3c630 100755 --- a/bin/build_docker_images.sh +++ b/bin/build_docker_images.sh @@ -10,29 +10,32 @@ unset CDPATH # the script. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + # Let the user start this script from anywhere in the filesystem. cd $DIR/.. +tag=$(