-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added 'import' tests and github actions for docker images (#1090)
* added basic tests and github actions * removed -i option from docker run during tests * updated docker test setup for mac and win * removed win docker test * modified docker tests on mac * removed docker tests on macos * added docker tests on macOS * removed docker devel test in macos
- Loading branch information
1 parent
8b1d03d
commit 78d730e
Showing
5 changed files
with
98 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Free disk space on Linux | ||
#sudo swapoff /swapfile | ||
#sudo rm -rf /swapfile | ||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
sudo apt-get remove php* ruby-* subversion mongodb-org -yq >/dev/null 2>&1 | ||
sudo apt-get autoremove -y >/dev/null 2>&1 | ||
sudo apt-get autoclean -y >/dev/null 2>&1 | ||
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1 | ||
docker rmi $(docker image ls -aq) >/dev/null 2>&1 | ||
#sudo swapoff /swapfile | ||
#sudo rm -rf /swapfile | ||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
sudo apt-get remove php* ruby-* subversion mongodb-org -yq >/dev/null 2>&1 | ||
sudo apt-get autoremove -y >/dev/null 2>&1 | ||
sudo apt-get autoclean -y >/dev/null 2>&1 | ||
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1 | ||
docker rmi $(docker image ls -aq) >/dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
# Copyright 2020 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. | ||
# ============================================================================== | ||
|
||
echo "Configuring the environment for build ..." | ||
./configure.sh | ||
|
||
echo "Cleaning up existing bazel build files ..." | ||
rm -rf bazel-* | ||
|
||
echo "Building the tensorflow-io package ..." | ||
bazel build -j 8 --copt=-msse4.2 --copt=-mavx --compilation_mode=opt --verbose_failures --test_output=errors --crosstool_top=//third_party/toolchains/gcc7_manylinux2010:toolchain //tensorflow_io/... | ||
|
||
echo "Validating import ..." | ||
python -c "import tensorflow_io as tfio; print(tfio.__version__)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# Copyright 2020 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. | ||
# ============================================================================== | ||
|
||
IMAGE_NAME="tfio-cpu" | ||
export PYTHON_BIN_PATH=$(which python3.7) | ||
|
||
echo "Build the docker image ..." | ||
docker build -f tools/docker/cpu.Dockerfile -t ${IMAGE_NAME} . | ||
|
||
echo "Starting the docker container from image: ${IMAGE_NAME} and validating import ..." | ||
docker run -t --rm ${IMAGE_NAME} python -c "import tensorflow_io as tfio; print(tfio.__version__)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# Copyright 2020 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. | ||
# ============================================================================== | ||
|
||
IMAGE_NAME="tfio-dev" | ||
export PYTHON_BIN_PATH=$(which python3) | ||
|
||
echo "Build the docker image ..." | ||
docker build -f tools/docker/devel.Dockerfile -t ${IMAGE_NAME} . | ||
|
||
echo "Starting the docker container from image: ${IMAGE_NAME} and building the package ..." | ||
docker run -t --rm --net=host -v ${PWD}:/v -w /v tfio-dev bash tools/docker/tests/bazel_build.sh |