Add release builds to custom op docker files so that it matches up with TF release.

Also remove cuda 10.0 from release as now head supports 10.1.

PiperOrigin-RevId: 291067152
Change-Id: I98fe5411d5aa5378919cfd43ad20a05b5d918c30
This commit is contained in:
Yifei Feng 2020-01-22 17:29:57 -08:00 committed by TensorFlower Gardener
parent 69cccde52d
commit 3ab94ef0f3
6 changed files with 65 additions and 5 deletions

View File

@ -328,6 +328,7 @@ tensorflow/tools/ci_build/release/ubuntu_16/cpu_py38_full/nightly_release.sh
tensorflow/tools/ci_build/release/ubuntu_16/cpu_py38_full/nonpip.sh tensorflow/tools/ci_build/release/ubuntu_16/cpu_py38_full/nonpip.sh
tensorflow/tools/ci_build/release/ubuntu_16/cpu_py38_full/pip.sh tensorflow/tools/ci_build/release/ubuntu_16/cpu_py38_full/pip.sh
tensorflow/tools/ci_build/release/ubuntu_16/custom_op/nightly.sh tensorflow/tools/ci_build/release/ubuntu_16/custom_op/nightly.sh
tensorflow/tools/ci_build/release/ubuntu_16/custom_op/release.sh
tensorflow/tools/ci_build/release/ubuntu_16/gpu_pip_on_cpu/build.sh tensorflow/tools/ci_build/release/ubuntu_16/gpu_pip_on_cpu/build.sh
tensorflow/tools/ci_build/release/ubuntu_16/gpu_py2_full/nightly_release.sh tensorflow/tools/ci_build/release/ubuntu_16/gpu_py2_full/nightly_release.sh
tensorflow/tools/ci_build/release/ubuntu_16/gpu_py2_full/nonpip.sh tensorflow/tools/ci_build/release/ubuntu_16/gpu_py2_full/nonpip.sh

View File

@ -69,6 +69,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && python3.5 get-pip.py && rm get-
RUN /install/install_pip_packages.sh RUN /install/install_pip_packages.sh
RUN /install/install_auditwheel.sh RUN /install/install_auditwheel.sh
# Install given tensorflow or tf-nightly version, if not specified, install the # latest official release
ARG TF_PACKAGE=tensorflow
ARG TF_PACKAGE_VERSION=
RUN pip install ${TF_PACKAGE}${TF_PACKAGE_VERSION:+==${TF_PACKAGE_VERSION}}
# TODO(klimek): Figure out a better way to get the right include paths # TODO(klimek): Figure out a better way to get the right include paths
# forwarded when we install new packages. # forwarded when we install new packages.
RUN ln -s "/usr/include/x86_64-linux-gnu/python2.7" "/dt7/usr/include/x86_64-linux-gnu/python2.7" RUN ln -s "/usr/include/x86_64-linux-gnu/python2.7" "/dt7/usr/include/x86_64-linux-gnu/python2.7"

View File

@ -69,6 +69,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && python3.5 get-pip.py && rm get-
RUN /install/install_pip_packages.sh RUN /install/install_pip_packages.sh
RUN /install/install_auditwheel.sh RUN /install/install_auditwheel.sh
# Install given tensorflow or tf-nightly version, if not specified, install the # latest official release
ARG TF_PACKAGE=tensorflow
ARG TF_PACKAGE_VERSION=
RUN pip install ${TF_PACKAGE}${TF_PACKAGE_VERSION:+==${TF_PACKAGE_VERSION}}
# TODO(klimek): Figure out a better way to get the right include paths # TODO(klimek): Figure out a better way to get the right include paths
# forwarded when we install new packages. # forwarded when we install new packages.
RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m" RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m"

View File

@ -71,6 +71,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && python3.5 get-pip.py && rm get-
RUN /install/install_pip_packages.sh RUN /install/install_pip_packages.sh
RUN /install/install_auditwheel.sh RUN /install/install_auditwheel.sh
# Install given tensorflow or tf-nightly version, if not specified, install the # latest official release
ARG TF_PACKAGE=tensorflow
ARG TF_PACKAGE_VERSION=
RUN pip install ${TF_PACKAGE}${TF_PACKAGE_VERSION:+==${TF_PACKAGE_VERSION}}
# TODO(klimek): Figure out a better way to get the right include paths # TODO(klimek): Figure out a better way to get the right include paths
# forwarded when we install new packages. # forwarded when we install new packages.
RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m" RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m"

View File

@ -17,20 +17,17 @@ set -e
# 1. Build the test server # 1. Build the test server
UBUNTU16_CPU_IMAGE="tensorflow/tensorflow:nightly-custom-op-ubuntu16" UBUNTU16_CPU_IMAGE="tensorflow/tensorflow:nightly-custom-op-ubuntu16"
UBUNTU16_GPU_CUDA10P0_IMAGE="tensorflow/tensorflow:nightly-custom-op-gpu-ubuntu16-cuda10.0"
UBUNTU16_GPU_IMAGE="tensorflow/tensorflow:nightly-custom-op-gpu-ubuntu16" UBUNTU16_GPU_IMAGE="tensorflow/tensorflow:nightly-custom-op-gpu-ubuntu16"
# Build the docker image # Build the docker image
cd tensorflow/tools/ci_build cd tensorflow/tools/ci_build
docker build --no-cache -t "${UBUNTU16_CPU_IMAGE}" -f Dockerfile.custom_op_ubuntu_16 . docker build --build-arg TF_PACKAGE=tf-nightly --no-cache -t "${UBUNTU16_CPU_IMAGE}" -f Dockerfile.custom_op_ubuntu_16 .
docker build --no-cache -t "${UBUNTU16_GPU_IMAGE}" -f Dockerfile.custom_op_ubuntu_16_cuda10.1 . docker build --build-arg TF_PACKAGE=tf-nightly --no-cache -t "${UBUNTU16_GPU_IMAGE}" -f Dockerfile.custom_op_ubuntu_16_cuda10.1 .
docker build --no-cache -t "${UBUNTU16_GPU_CUDA10P0_IMAGE}" -f Dockerfile.custom_op_ubuntu_16_cuda10.0 .
# Log into docker hub, push the image and log out # Log into docker hub, push the image and log out
docker login -u "${TF_DOCKER_USERNAME}" -p "${TF_DOCKER_PASSWORD}" docker login -u "${TF_DOCKER_USERNAME}" -p "${TF_DOCKER_PASSWORD}"
docker push "${UBUNTU16_CPU_IMAGE}" docker push "${UBUNTU16_CPU_IMAGE}"
docker push "${UBUNTU16_GPU_IMAGE}" docker push "${UBUNTU16_GPU_IMAGE}"
docker push "${UBUNTU16_GPU_CUDA10P0_IMAGE}"
docker logout#!/bin/bash docker logout#!/bin/bash

View File

@ -0,0 +1,47 @@
!/bin/bash
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
set -e
set -x
if [[ -z "${TF_VERSION}" ]]; then
echo "TF_VERSION needs to be set, for example 2.1.0rc0."
exit
fi
UBUNTU16_CPU_IMAGE="tensorflow/tensorflow:custom-op-ubuntu16"
UBUNTU16_GPU_IMAGE="tensorflow/tensorflow:custom-op-gpu-ubuntu16"
VERSIONED_UBUNTU16_CPU_IMAGE="tensorflow/tensorflow:${TF_VERSION}-custom-op-ubuntu16"
VERSIONED_UBUNTU16_GPU_IMAGE="tensorflow/tensorflow:${TF_VERSION}-custom-op-gpu-ubuntu16"
# Build the docker image
cd tensorflow/tools/ci_build
docker build --build-arg TF_PACKAGE_VERSION=${TF_VERSION} --no-cache -t "${VERSIONED_UBUNTU16_CPU_IMAGE}" -f Dockerfile.custom_op_ubuntu_16 .
docker build --build-arg TF_PACKAGE_VERSION=${TF_VERSION} --no-cache -t "${VERSIONED_UBUNTU16_GPU_IMAGE}" -f Dockerfile.custom_op_ubuntu_16_cuda10.1 .
# Log into docker hub, push the image and log out
docker login -u "${TF_DOCKER_USERNAME}" -p "${TF_DOCKER_PASSWORD}"
docker push "${VERSIONED_UBUNTU16_CPU_IMAGE}"
docker push "${VERSIONED_UBUNTU16_GPU_IMAGE}"
# Tag and push the default images
docker tag "${VERSIONED_UBUNTU16_CPU_IMAGE}" "${UBUNTU16_CPU_IMAGE}"
docker push "${UBUNTU16_CPU_IMAGE}"
docker tag "${VERSIONED_UBUNTU16_GPU_IMAGE}" "${UBUNTU16_GPU_IMAGE}"
docker push "${UBUNTU16_GPU_IMAGE}"
docker logout#!/bin/bash