Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from NVIDIA/circle_ci_addition
Browse files Browse the repository at this point in the history
[CI Automation] Circle-CI Addition
  • Loading branch information
Jonathan DEKHTIAR committed Mar 23, 2020
2 parents 0897441 + c0e4dfc commit 8baa1c6
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"

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/*
96 changes: 96 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
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 .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"
###################################################################################
# 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_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:
# tags:
# only: /\d+\.\d+(\.\d+)?(\S*)?$/
# branches:
# ignore: /.*/

0 comments on commit 8baa1c6

Please sign in to comment.