diff --git a/repository-containers/github.com/tensorflow/addons/.devcontainer/Dockerfile b/repository-containers/github.com/tensorflow/addons/.devcontainer/Dockerfile new file mode 100644 index 0000000000..0d9ddd6b38 --- /dev/null +++ b/repository-containers/github.com/tensorflow/addons/.devcontainer/Dockerfile @@ -0,0 +1,22 @@ +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +FROM tensorflow/tensorflow:2.1.0-custom-op-gpu-ubuntu16 + +# Install git +RUN apt-get update && apt-get -y install git + +# Install dev tools + +# Install tensorflow +RUN pip install tensorflow~=2.1.0 typeguard>=2.7 + +COPY tools/install_deps/finish_bazel_install.sh ./ +RUN bash finish_bazel_install.sh + +# Clean up +RUN apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* diff --git a/repository-containers/github.com/tensorflow/addons/.devcontainer/devcontainer.json b/repository-containers/github.com/tensorflow/addons/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..1aed44e501 --- /dev/null +++ b/repository-containers/github.com/tensorflow/addons/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "name": "TensorFlow-addons", + "dockerFile": "Dockerfile", + "extensions": [ + "ms-python.python", + "ms-vscode.cpptools" + ] +} \ No newline at end of file diff --git a/repository-containers/github.com/tensorflow/addons/tools/finish_bazel_install.sh b/repository-containers/github.com/tensorflow/addons/tools/finish_bazel_install.sh new file mode 100644 index 0000000000..53ea9d305e --- /dev/null +++ b/repository-containers/github.com/tensorflow/addons/tools/finish_bazel_install.sh @@ -0,0 +1,12 @@ +set -e +# hack to have the dependecies in the docker cache +# and have much faster local build with docker +# can be removed once docker buildx/buildkit is stable +# and we'll use "RUN --mount=cache ..." instead +cd /tmp +git clone https://github.com/tensorflow/addons.git +cd addons +python ./configure.py --no-deps +bazel build --nobuild -- //tensorflow_addons/... +cd .. +rm -rf ./addons \ No newline at end of file