" "${FILE}" | cut -d : -f 1))
BUILDFROMSOURCE_LINENO_ALL=($(grep -n "
" "${FILE}" | cut -d : -f 1))
-# validation instructions
-PYTHON_GPU_VALIDATION="import mxnet as mx; a = mx.nd.ones((2, 3), mx.gpu()); b = a * 2 + 1; b.asnumpy()"
-PYTHON_CPU_VALIDATION="import mxnet as mx; a = mx.nd.ones((2, 3)); b = a * 2 + 1; b.asnumpy()"
-
# Given two line numbers, collects instruction sets for installing via Virtualenv, Pip, Docker, and source within the
# two lines assuming there is one of each.
#
@@ -242,139 +232,74 @@ function set_instruction_set() {
${sorted_indexes[$end_buildfromsource_command_index]})
}
-if [[ "${TASK}" == "linux" ]]
-then
-
- ########################LINUX-PYTHON-CPU############################
- echo
- echo
- echo "### Testing LINUX-PYTHON-CPU ###"
- echo
- # range of all lines inside Linux-Python-CPU instructions
- LINUX_PYTHON_CPU_START_LINENO=$(grep -n "START - Linux Python CPU Installation Instructions" "${FILE}" | cut -d : -f 1)
- LINUX_PYTHON_CPU_END_LINENO=$(grep -n "END - Linux Python CPU Installation Instructions" "${FILE}" | cut -d : -f 1)
-
- set_instruction_set ${LINUX_PYTHON_CPU_START_LINENO} ${LINUX_PYTHON_CPU_END_LINENO}
-
- virtualenv_commands="${virtualenv_commands} python -c \"${PYTHON_CPU_VALIDATION}\""
- echo
- echo "### Testing Virtualenv ###"
- echo "${virtualenv_commands}"
- echo
- docker run --rm ubuntu:14.04 bash -c "${virtualenv_commands}"
-
- pip_commands="${pip_commands} python -c \"${PYTHON_CPU_VALIDATION}\""
- echo
- echo "### Testing Pip ###"
- echo "${pip_commands}"
- echo
- docker run --rm ubuntu:14.04 bash -c "${pip_commands}"
-
- docker_img=$(echo "$docker_commands" | sed 's/.*docker pull \(.*\)/\1/' | sed 's/;.*//')
- docker_commands="${docker_commands} docker run ${docker_img} python -c \"${PYTHON_CPU_VALIDATION}\""
- echo
- echo "### Testing Docker ###"
- echo "${docker_commands}"
- echo
- eval "${docker_commands}"
-
- buildfromsource_commands="${buildfromsource_commands} python -c \"${PYTHON_CPU_VALIDATION}\""
- echo
- echo "### Testing Build From Source ###"
- echo "${buildfromsource_commands}"
- echo
- docker run --rm ubuntu:14.04 bash -c "${buildfromsource_commands}"
-
- #########################LINUX-PYTHON-GPU###########################
-
- echo
- echo
- echo "### Testing LINUX-PYTHON-GPU ###"
- echo
- # range of all lines inside Linux-Python-GPU instructions
- LINUX_PYTHON_GPU_START_LINENO=$(grep -n "START - Linux Python GPU Installation Instructions" "${FILE}" | cut -d : -f 1)
- LINUX_PYTHON_GPU_END_LINENO=$(grep -n "END - Linux Python GPU Installation Instructions" "${FILE}" | cut -d : -f 1)
-
- set_instruction_set ${LINUX_PYTHON_GPU_START_LINENO} ${LINUX_PYTHON_GPU_END_LINENO}
-
- virtualenv_commands="${virtualenv_commands} python -c \"${PYTHON_GPU_VALIDATION}\""
- echo
- echo "### Testing Virtualenv ###"
- echo "${virtualenv_commands}"
- echo
- nvidia-docker run --rm nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04 bash -c "${virtualenv_commands}"
-
- pip_commands="${pip_commands} python -c \"${PYTHON_GPU_VALIDATION}\""
- echo
- echo "### Testing Pip ###"
- echo "${pip_commands}"
- echo
- nvidia-docker run --rm nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04 bash -c "${pip_commands}"
-
- docker_img=$(echo "$docker_commands" | sed 's/.*docker pull \(.*\)/\1/' | sed 's/;.*//')
- docker_commands="${docker_commands} nvidia-docker run ${docker_img} python -c \"${PYTHON_GPU_VALIDATION}\""
- echo
- echo "### Testing Docker ###"
- echo "${docker_commands}"
- echo
- eval "${docker_commands}"
-
- buildfromsource_commands="${buildfromsource_commands} python -c \"${PYTHON_GPU_VALIDATION}\""
- echo
- echo "### Testing Build From Source ###"
- echo "${buildfromsource_commands}"
- echo
- nvidia-docker run --rm nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04 bash -c "${buildfromsource_commands}"
-
-else
-
- #########################MACOS-PYTHON-CPU###########################
- # Currently this section is invoked in ../travis/run_test.sh so this test can run on MacOS.
- echo
- echo
- echo "### Testing MACOS-PYTHON-CPU ###"
- echo
- # range of all lines inside MacOS-Python-CPU instructions
- MAC_PYTHON_CPU_START_LINENO=$(grep -n "START - MacOS Python CPU Installation Instructions" "${FILE}" | cut -d : -f 1)
- MAC_PYTHON_CPU_END_LINENO=$(grep -n "END - Mac OS Python CPU Installation Instructions" "${FILE}" | cut -d : -f 1)
-
- set_instruction_set ${MAC_PYTHON_CPU_START_LINENO} ${MAC_PYTHON_CPU_END_LINENO}
-
- if [[ "${TASK}" == "installation_packaged_test" ]]
- then
- virtualenv_commands="${virtualenv_commands} python -c \"import sys; print hasattr(sys, 'real_prefix'); ${PYTHON_CPU_VALIDATION}\"; deactivate;"
- echo
- echo "### Testing Virtualenv ###"
- echo "${virtualenv_commands}"
- echo
- eval "${virtualenv_commands}"
-
- pip_commands="${pip_commands} python -c \"${PYTHON_CPU_VALIDATION}\""
- echo
- echo "### Testing Pip ###"
- echo "${pip_commands}"
- echo
- eval "${pip_commands}"
-
- exit
- fi
-
- ###COMMENTING THIS OUT FOR NOW AS TRAVIS DOES NOT SUPPORT DOCKER FOR MAC
-# echo
-# echo "### Testing Docker ###"
-# echo "${docker_commands}"
-# echo
-# eval ${docker_commands}
- if [[ "${TASK}" == "installation_source_test" ]]
- then
- buildfromsource_commands="${buildfromsource_commands} python -c \"${PYTHON_CPU_VALIDATION}\""
- echo
- echo "### Testing Build From Source ###"
- echo "${buildfromsource_commands}"
- echo
- eval "${buildfromsource_commands}"
-
- exit
- fi
-fi
+########################LINUX-PYTHON-CPU############################
+echo
+echo
+echo "### Testing LINUX-PYTHON-CPU ###"
+echo
+# range of all lines inside Linux-Python-CPU instructions
+LINUX_PYTHON_CPU_START_LINENO=$(grep -n "START - Linux Python CPU Installation Instructions" "${FILE}" | cut -d : -f 1)
+LINUX_PYTHON_CPU_END_LINENO=$(grep -n "END - Linux Python CPU Installation Instructions" "${FILE}" | cut -d : -f 1)
+
+set_instruction_set ${LINUX_PYTHON_CPU_START_LINENO} ${LINUX_PYTHON_CPU_END_LINENO}
+
+echo
+echo "### Testing Virtualenv ###"
+echo "${virtualenv_commands}"
+echo
+docker run --rm ubuntu:14.04 bash -c "${virtualenv_commands}"
+
+echo
+echo "### Testing Pip ###"
+echo "${pip_commands}"
+echo
+docker run --rm ubuntu:14.04 bash -c "${pip_commands}"
+
+echo
+echo "### Testing Docker ###"
+echo "${docker_commands}"
+echo
+eval ${docker_commands}
+
+echo
+echo "### Testing Build From Source ###"
+echo "${buildfromsource_commands}"
+echo
+docker run --rm ubuntu:14.04 bash -c "${buildfromsource_commands}"
+
+#########################LINUX-PYTHON-GPU###########################
+
+echo
+echo
+echo "### Testing LINUX-PYTHON-GPU ###"
+echo
+# range of all lines inside Linux-Python-GPU instructions
+LINUX_PYTHON_GPU_START_LINENO=$(grep -n "START - Linux Python GPU Installation Instructions" "${FILE}" | cut -d : -f 1)
+LINUX_PYTHON_GPU_END_LINENO=$(grep -n "END - Linux Python GPU Installation Instructions" "${FILE}" | cut -d : -f 1)
+
+set_instruction_set ${LINUX_PYTHON_GPU_START_LINENO} ${LINUX_PYTHON_GPU_END_LINENO}
+
+echo
+echo "### Testing Virtualenv ###"
+echo "${virtualenv_commands}"
+echo
+nvidia-docker run --rm nvidia/cuda:7.5-cudnn5-devel bash -c "${virtualenv_commands}"
+
+echo
+echo "### Testing Pip ###"
+echo "${pip_commands}"
+echo
+nvidia-docker run --rm nvidia/cuda:7.5-cudnn5-devel bash -c "${pip_commands}"
+
+echo
+echo "### Testing Docker ###"
+echo "${docker_commands}"
+echo
+eval ${docker_commands}
+
+echo
+echo "### Testing Build From Source ###"
+echo "${buildfromsource_commands}"
+echo
+nvidia-docker run --rm nvidia/cuda:7.5-cudnn5-devel bash -c "${buildfromsource_commands}"
diff --git a/tests/travis/run_test.sh b/tests/travis/run_test.sh
index 540d013f1f16..cff4196b6043 100755
--- a/tests/travis/run_test.sh
+++ b/tests/travis/run_test.sh
@@ -5,22 +5,6 @@ then
exit 0
fi
-if [[ ${TASK} == *"installation"* ]]; then
- git remote add main https://github.com/dmlc/mxnet.git
- git fetch main master
- echo "File changes compared to origin/master:"
- echo "**********************************"
- git diff --name-only remotes/main/master
- echo "**********************************"
-
- if [[ ! $(git diff --name-only remotes/main/master | grep install.md) ]]; then
- echo "No changes to install.md. Skipping installation tasks..."
- exit 0
- fi
- ./tests/jenkins/run_test_installation_docs.sh docs/get_started/install.md ${TASK}
- exit $?
-fi
-
if [ ${TASK} == "lint" ]; then
make lint || exit -1
echo "Check documentations of c++ code..."
@@ -109,7 +93,6 @@ if [ ${TASK} == "r_test" ]; then
fi
if [ ${TASK} == "python_test" ]; then
- export PYTHONPATH=${PYTHONPATH}:${PWD}/python
make all || exit -1
# use cached dir for storing data
rm -rf ${PWD}/data
diff --git a/tests/travis/setup.sh b/tests/travis/setup.sh
index e1027b0db05e..ec071009bda5 100755
--- a/tests/travis/setup.sh
+++ b/tests/travis/setup.sh
@@ -5,7 +5,7 @@ then
exit 0
fi
-if [[ ${TRAVIS_OS_NAME} == "osx" && ${TASK} != *"installation"* ]]; then
+if [ ${TRAVIS_OS_NAME} == "osx" ]; then
brew update
brew tap homebrew/science
brew install opencv