From 5f3943da0ed8dd2f23c794305d73a4ffeb442a9c Mon Sep 17 00:00:00 2001 From: Jonathan DEKHTIAR Date: Mon, 23 Mar 2020 12:46:34 -0700 Subject: [PATCH 1/3] Create config.yml --- .circleci/config.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..e396f5c --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,48 @@ +version: 2.1 + +jobs: + + test_nightly_py3_gpu: + working_directory: ~/build + docker: + - image: docker:git + steps: + - checkout + + - setup_remote_docker: + reusable: true + exclusive: true + + - run: + name: TEST BUILD - Build Docker Image Python 3 Tensorflow Nightly GPU + command: | + cd docker + docker build -t nightly_py3_gpu . --build-arg TF_CONTAINER_VERSION="latest" + + +################################################################################### +# CircleCI WORKFLOWS # +################################################################################### + +workflows: + version: 2 + build-and-deploy: + jobs: + + ################################################################################### + # TEST BUILDS with TensorLayer installed from Source - NOT PUSHED TO DOCKER HUB # + ################################################################################### + + - test_nightly_py3_gpu: + filters: + tags: + ignore: /.*/ + branches: + ignore: master + + # - test_nightly_py3_gpu: + # filters: + # tags: + # only: /\d+\.\d+(\.\d+)?(\S*)?$/ + # branches: + # ignore: /.*/ From 14cc316bd111f9872cce1b34c1373579efc9038e Mon Sep 17 00:00:00 2001 From: Jonathan DEKHTIAR Date: Mon, 23 Mar 2020 12:52:20 -0700 Subject: [PATCH 2/3] Create Dockerfile --- .circleci/Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .circleci/Dockerfile diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile new file mode 100644 index 0000000..6a0cfdc --- /dev/null +++ b/.circleci/Dockerfile @@ -0,0 +1,30 @@ +# Build args. +# * Accepted Values: +# - Python 3 + Latest GPU: "latest-gpu-py3" => --build-arg TF_CONTAINER_VERSION="latest-gpu-py3" +# - Python 3 + Latest Devel GPU: "latest-devel-gpu-py3" => --build-arg TF_CONTAINER_VERSION="latest-devel-gpu-py3" +# - Python 3 + Nightly GPU: "nightly-gpu-py3" => --build-arg TF_CONTAINER_VERSION="nightly-gpu-py3" + +ARG TF_CONTAINER_VERSION + +FROM tensorflow/tensorflow:${TF_CONTAINER_VERSION} + +LABEL version="1.0" maintainer="Jonathan DEKHTIAR " + +ARG PIP_VERSION +ARG TF_CONTAINER_VERSION + +RUN echo "Container Tag: ${TF_CONTAINER_VERSION}" \ + && apt-get update \ + && if [ -z "$PIP_VERSION" ]; then \ + echo "Building a Nightly Release" \ + && apt-get install -y git \ + && mkdir /dist/ && cd /dist/ \ + && git clone https://github.com/NVIDIA/nvtx-plugins.git \ + && cd nvtx-plugins \ + && pip install --disable-pip-version-check --no-cache-dir --upgrade -e .; \ + else \ + echo "Building Tag Release: $PIP_VERSION" \ + && pip install --disable-pip-version-check --no-cache-dir --upgrade nvtx-plugins=="${PIP_VERSION }"; \ + fi \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* From c0e4dfc7310971a4cb0d49c0f6fb930625e2725d Mon Sep 17 00:00:00 2001 From: Jonathan DEKHTIAR Date: Mon, 23 Mar 2020 12:55:04 -0700 Subject: [PATCH 3/3] Update config.yml --- .circleci/config.yml | 54 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e396f5c..9ecf150 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,8 +16,42 @@ jobs: - run: name: TEST BUILD - Build Docker Image Python 3 Tensorflow Nightly GPU command: | - cd docker - docker build -t nightly_py3_gpu . --build-arg TF_CONTAINER_VERSION="latest" + cd .circleci/ + docker build -t nightly_py3_gpu . --build-arg TF_CONTAINER_VERSION="nightly-gpu-py3" + + test_latest_py3_gpu: + working_directory: ~/build + docker: + - image: docker:git + steps: + - checkout + + - setup_remote_docker: + reusable: true + exclusive: true + + - run: + name: TEST BUILD - Build Docker Image Python 3 Tensorflow Latest GPU + command: | + cd .circleci/ + docker build -t latest_py3_gpu . --build-arg TF_CONTAINER_VERSION="latest-gpu-py3" + + test_latest_devel_py3_gpu: + working_directory: ~/build + docker: + - image: docker:git + steps: + - checkout + + - setup_remote_docker: + reusable: true + exclusive: true + + - run: + name: TEST BUILD - Build Docker Image Python 3 Tensorflow Latest Devel GPU + command: | + cd .circleci/ + docker build -t latest_devel_py3_gpu . --build-arg TF_CONTAINER_VERSION="latest-devel-gpu-py3" ################################################################################### @@ -38,7 +72,21 @@ workflows: tags: ignore: /.*/ branches: - ignore: master + ignore: master + + - test_latest_py3_gpu: + filters: + tags: + ignore: /.*/ + branches: + ignore: master + + - test_latest_devel_py3_gpu: + filters: + tags: + ignore: /.*/ + branches: + ignore: master # - test_nightly_py3_gpu: # filters: