Skip to content

Commit

Permalink
All GitHub Actions pass and also test U18/20
Browse files Browse the repository at this point in the history
Signed-off-by: Gines Hidalgo <[email protected]>
  • Loading branch information
gineshidalgo99 committed Jan 19, 2021
1 parent dddaa81 commit 59a29ea
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 122 deletions.
169 changes: 112 additions & 57 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,63 @@ jobs:
fail-fast: false
matrix:
include:
# Ubuntu 16.04
# Ubuntu 16.04 - Default - CMake - CUDA
- os: ubuntu-16.04
# Ubuntu
# Ubuntu 20.04 - Default - CMake - CUDA
- os: ubuntu-20.04
os_name: linux
env:
NAME: U16-default-cmake-cuda8
NAME: U20-default-cmake-cuda
WITH_CUDNN: false
TRAVIS_OS_NAME: linux

# Ubuntu 16.04 - Python - CMake - CUDA
- os: ubuntu-16.04
# Ubuntu 18.04 - Default - CMake - CUDA
- os: ubuntu-18.04
os_name: linux
env:
NAME: U18-default-cmake-cuda
WITH_CUDNN: false
TRAVIS_OS_NAME: linux
# Ubuntu 20.04 - Python - CMake - CUDA
- os: ubuntu-20.04
os_name: linux
env:
NAME: U16-python-cmake-cuda8
NAME: U20-python-cmake-cuda
WITH_CUDNN: false
WITH_PYTHON: true
TRAVIS_OS_NAME: linux
TRAVIS_BUILD_NUMBER: ${{ github.run_number }}
TRAVIS_COMMIT: ${{ github.sha }}
PYTHON3_VERSION: python3.8
DOCS: true

# Ubuntu 18.04 - Python - CMake - CUDA
- os: ubuntu-18.04
os_name: linux
env:
NAME: U18-python-cmake-cuda
WITH_CUDNN: false
WITH_PYTHON: true
TRAVIS_OS_NAME: linux
TRAVIS_BUILD_NUMBER: ${{ github.run_number }}
TRAVIS_COMMIT: ${{ github.sha }}
DOCS: true
# Ubuntu 20.04 - Python - CMake - CPU
- os: ubuntu-20.04
os_name: linux
env:
NAME: U20-python-cmake-cpu
WITH_PYTHON: true
WITH_CUDA: false
WITH_CUDNN: false
TRAVIS_OS_NAME: linux
PYTHON3_VERSION: python3.8
# Ubuntu 18.04 - Python - CMake - CPU
- os: ubuntu-18.04
os_name: linux
env:
NAME: U18-python-cmake-cpu
WITH_PYTHON: true
WITH_CUDA: false
WITH_CUDNN: false
TRAVIS_OS_NAME: linux
# Ubuntu 16.04 - Python - CMake - CPU
- os: ubuntu-16.04
os_name: linux
Expand All @@ -44,7 +82,28 @@ jobs:
WITH_CUDA: false
WITH_CUDNN: false
TRAVIS_OS_NAME: linux

# TO-DO (not passing)
# # Ubuntu 20.04 - Python - CMake - OpenCL
# - os: ubuntu-20.04
# os_name: linux
# env:
# NAME: U20-python-cmake-opencl
# WITH_PYTHON: true
# WITH_CUDA: false
# WITH_CUDNN: false
# WITH_OPEN_CL: true
# TRAVIS_OS_NAME: linux
# PYTHON3_VERSION: python3.8
# Ubuntu 18.04 - Python - CMake - OpenCL
- os: ubuntu-18.04
os_name: linux
env:
NAME: U18-python-cmake-opencl
WITH_PYTHON: true
WITH_CUDA: false
WITH_CUDNN: false
WITH_OPEN_CL: true
TRAVIS_OS_NAME: linux
# Ubuntu 16.04 - Python - CMake - OpenCL
- os: ubuntu-16.04
os_name: linux
Expand All @@ -55,7 +114,27 @@ jobs:
WITH_CUDNN: false
WITH_OPEN_CL: true
TRAVIS_OS_NAME: linux

# Ubuntu 20.04 - Python - CMake - CPU - Debug
- os: ubuntu-20.04
os_name: linux
env:
NAME: U20-python-cmake-cpu-debug
WITH_PYTHON: true
WITH_CUDA: false
WITH_CUDNN: false
WITH_DEBUG: true
TRAVIS_OS_NAME: linux
PYTHON3_VERSION: python3.8
# Ubuntu 18.04 - Python - CMake - CPU - Debug
- os: ubuntu-18.04
os_name: linux
env:
NAME: U18-python-cmake-cpu-debug
WITH_PYTHON: true
WITH_CUDA: false
WITH_CUDNN: false
WITH_DEBUG: true
TRAVIS_OS_NAME: linux
# Ubuntu 16.04 - Python - CMake - CPU - Debug
- os: ubuntu-16.04
os_name: linux
Expand All @@ -66,17 +145,25 @@ jobs:
WITH_CUDNN: false
WITH_DEBUG: true
TRAVIS_OS_NAME: linux

# Ubuntu 16.04 - Python - CMake - CPU - Unity
- os: ubuntu-16.04
# Ubuntu 20.04 - Python - CMake - CPU - Unity
- os: ubuntu-20.04
os_name: linux
env:
NAME: U16-python-cmake-cpu-unity
NAME: U20-python-cmake-cpu-unity
WITH_PYTHON: true
WITH_UNITY: true
WITH_CUDA: false
WITH_CUDNN: false
TRAVIS_OS_NAME: linux
PYTHON3_VERSION: python3.8
# Ubuntu 20.04 - Default - CMake - CPU
- os: ubuntu-20.04
os_name: linux
env:
NAME: U20-default-cmake-cpu
WITH_CUDA: false
WITH_CUDNN: false
TRAVIS_OS_NAME: linux

# Mac OSX
# Mac OSX - Python - CMake - CPU
Expand All @@ -88,7 +175,6 @@ jobs:
WITH_CUDNN: false
WITH_PYTHON: true
TRAVIS_OS_NAME: osx

# Mac OSX - Python - CMake - OpenCL
- os: macos-10.15
os_name: osx
Expand All @@ -98,7 +184,6 @@ jobs:
WITH_CUDNN: false
WITH_OPEN_CL: true
TRAVIS_OS_NAME: osx

# Mac OSX - Python - CMake - CPU - Debug
- os: macos-10.15
os_name: osx
Expand All @@ -109,7 +194,6 @@ jobs:
WITH_PYTHON: true
WITH_DEBUG: true
TRAVIS_OS_NAME: osx

# Mac OSX - Python - CMake - CPU - Unity
- os: macos-10.15
os_name: osx
Expand All @@ -120,7 +204,6 @@ jobs:
WITH_PYTHON: true
WITH_UNITY: true
TRAVIS_OS_NAME: osx

# Mac OSX - Default - CMake - CPU
- os: macos-10.15
os_name: osx
Expand All @@ -130,53 +213,25 @@ jobs:
WITH_CUDNN: false
TRAVIS_OS_NAME: osx

# Ubuntu (others)
# Ubuntu 16.04 - Default - CMake - CPU
- os: ubuntu-16.04
os_name: linux
env:
NAME: U16-default-cmake-cpu
WITH_CUDA: false
WITH_CUDNN: false
TRAVIS_OS_NAME: linux

# Ubuntu 16.04 - Default - Make - CUDA
- os: ubuntu-16.04
os_name: linux
env:
NAME: U16-default-make-cuda8
WITH_CMAKE: false
TRAVIS_OS_NAME: linux

# # TO-DO: To be implemented
# # Ubuntu 16.04 - Default - CMake - CPU MKL
# TO-DO (not passing)
# Note: CUDA jobs fail in U16 because of an issue with GCC 5.5 (https://github.com/NVIDIA/apex/issues/529). GH Actions doesn't support
# GCC 5.4 and CUDA does not support newer than GCC 5.X. Thus, cuDNN (sh file only for Ubuntu 16) is no longer tested.
# # Ubuntu 16.04
# # Ubuntu 16.04 - Default - CMake - CUDA
# - os: ubuntu-16.04
# os_name: linux
# env:
# NAME: U16-default-cmake-cpu-mkl
# WITH_CUDA: false
# WITH_CUDNN: false
# WITH_MKL: true
# TRAVIS_OS_NAME: linux

# # Ubuntu 16.04 - Python - CMake - OpenCL
# - os: ubuntu-16.04
# os_name: linux
# env:
# NAME: U16-python-cmake-opencl
# WITH_PYTHON: true
# WITH_CUDA: false
# WITH_CUDNN: false
# WITH_OPEN_CL: true
# NAME: U16-default-cmake-cuda8
# TRAVIS_OS_NAME: linux

# # Unnecessary/redundant ones
# # Ubuntu 16.04 - Default - CMake - CUDA - no cuDNN
# # Deprecated (not working for the above issue between CUDA and the Ubuntu16 from GitHub Actions)
# # Ubuntu 16.04 - Default - Make - CUDA
# - os: ubuntu-16.04
# os_name: linux
# env:
# NAME: U16-default-cmake-cuda8-nocudnn
# NAME: U16-default-make-cuda
# WITH_CUDNN: false
# WITH_CMAKE: false
# TRAVIS_OS_NAME: linux

steps:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ if (UNIX OR APPLE)

if (USE_CUDNN AND NOT CUDNN_FOUND)
message(STATUS "cuDNN not found.")
execute_process(COMMAND cat install_cudnn.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/scripts/ubuntu)
execute_process(COMMAND cat install_cudnn_up_to_Ubuntu16.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/scripts/ubuntu)
message(FATAL_ERROR "Install cuDNN using the above commands. or turn off cuDNN by setting USE_CUDNN to OFF.")
endif (USE_CUDNN AND NOT CUDNN_FOUND)
endif (${GPU_MODE} MATCHES "CUDA")
Expand Down
8 changes: 7 additions & 1 deletion doc/installation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ OpenPose - Installation
4. [CMake Configuration](#cmake-configuration)
5. [Compilation](#compilation)
6. [Running OpenPose](#running-openpose)
7. [Custom User Code](#custom-user-code)
4. [Compiling and Running OpenPose from Source on ROS, Docker, and Google Colab - Community-Based Work](#compiling-and-running-openpose-from-source-on-ros-docker-and-google-colab-community-based-work)
5. [Uninstalling, Reinstalling, or Updating OpenPose](#Uninstalling-reinstalling-or-updating-openpose)
6. [Advanced Additional Settings (Optional)](#advanced-additional-settings-optional)
Expand Down Expand Up @@ -219,7 +220,12 @@ Check OpenPose was properly installed by running any demo example: [doc/demo_qui
### Compiling and Running OpenPose from Source on ROS, Docker, and Google Colab - Community-Based Work
### Custom User Code
You can quickly add your custom code so that quick prototypes can be easily tested without having to create a whole new project just for it. See [examples/user_code/README.md](../../examples/user_code/README.md) for more details.
## Compiling and Running OpenPose from Source on ROS, Docker, and Google Colab - Community-Based Work
If you do not want to use the Windows portable binaries nor compile it from source code, we add links to some community-based work based on OpenPose. Note: We do not support them, and we will remove new GitHub issues opened asking about them as well as block those users from posting again. If you face any issue, comment only in the GitHub issues links especified below, or ask the owner of them.
- ROS examples:
Expand Down
6 changes: 3 additions & 3 deletions doc/installation/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ These tips are **very important** and avoid many bugs:
3. Nvidia GPU version prerequisites:
1. **Note: OpenPose has been tested extensively with CUDA 11.1.1 (cuDNN 8.0.5) for Ubuntu 20**. Older OpenPose versions (v1.6.X and v1.5.X) were tested with **CUDA 10.1 (cuDNN 7.5.1) for Ubuntu 18 and CUDA 8.0 (cuDNN 5.1) for Ubuntu 14 and 16**. We highly recommend using those combinations to minimize potential installation issues. Other combinations should also work, but we do not provide any support about installation/compilation issues related to CUDA/cuDNN or their integration with OpenPose.
2. Upgrade your Nvidia drivers to the latest version.
3. **CUDA**:
3. **CUDA**: You can simply run `sudo bash ./scripts/ubuntu/install_cuda.sh` if you are not too familiar with CUDA. If you are, then you could also do one of the following instead:
- Ubuntu 20 ([**CUDA 11.1**](https://developer.nvidia.com/cuda-downloads)): Download CUDA 11.1 from their [official website](https://developer.nvidia.com/cuda-downloads). Most Ubuntu computers use the `Architecture` named `x86_64`, and we personally recommend the `Installer Type` named `runfile (local)`. Then, follow the Nvidia website installation instructions. When installing, make sure to enable the symbolic link in `usr/local/cuda` to minimize potential future errors.
- Ubuntu 18 ([**CUDA 10.1**](https://developer.nvidia.com/cuda-10.1-download-archive-base)): Analog to the instructions for Ubuntu 20, but using CUDA version 10.1.
- Ubuntu 14 or 16 ([**CUDA 8**](https://developer.nvidia.com/cuda-80-ga2-download-archive) **or 10**): Run `sudo ./scripts/ubuntu/install_cuda.sh` (if Ubuntu 16 or 14 and for Graphic cards up to 10XX) or alternatively download and install it from their website.
4. **cuDNN**:
- Download it (usually called `cuDNN Library for Linux (x86_64)`):
- Ubuntu 20: [**cuDNN 8.0.4**](https://developer.nvidia.com/cudnn).
- Ubuntu 18: [**cuDNN 7.5.1**](https://developer.nvidia.com/rdp/cudnn-archive).
- Ubuntu 14 or 16 (**cuDNN 5.1 or 7.2**): Run `sudo ./scripts/ubuntu/install_cudnn.sh` (if Ubuntu 16 or 14 and for Graphic cards up to 10XX) or alternatively [download it from their website](https://developer.nvidia.com/rdp/cudnn-archive).
- Ubuntu 14 or 16 (**cuDNN 5.1 or 7.2**): Run `sudo ./scripts/ubuntu/install_cudnn_up_to_Ubuntu16.sh` (if Ubuntu 16 or 14 and for Graphic cards up to 10XX) or alternatively [download it from their website](https://developer.nvidia.com/rdp/cudnn-archive).
- And install it:
- In order to manually install it (any version), just unzip it and copy (merge) its contents on the CUDA folder, usually `/usr/local/cuda-{version}/` in Ubuntu and `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v{version}\` in Windows.
5. OpenCL / AMD GPU version prerequisites (only if you do not have an Nvidia GPU and want to run on AMD graphic cards):
Expand All @@ -56,7 +56,7 @@ These tips are **very important** and avoid many bugs:
2. Install `sudo apt-get install libviennacl-dev`.
6. Install **Caffe, OpenCV, and Caffe prerequisites**:
- OpenCV must be already installed on your machine. It can be installed with `sudo apt-get install libopencv-dev`. You could also use your own compiled OpenCV version.
- Caffe prerequisites: By default, OpenPose uses Caffe under the hood. If you have not used Caffe previously, install its dependencies by running `sudo bash ./scripts/ubuntu/install_deps.sh` after installing your desired CUDA and cuDNN versions. If you are using Ubuntu 14 or 16, you can simply run `sudo bash ./scripts/ubuntu/install_deps_and_cuda.sh` (if Ubuntu 16 or 14 and for Graphic cards up to 10XX).
- Caffe prerequisites: By default, OpenPose uses Caffe under the hood. If you have not used Caffe previously, install its dependencies by running `sudo bash ./scripts/ubuntu/install_deps.sh` after installing your desired CUDA and cuDNN versions.
7. Python prerequisites (optional, only if you plan to use the Python API): python-dev, Numpy (for array management), and OpenCV (for image loading).
```
# Python 3 (default and recommended)
Expand Down
7 changes: 4 additions & 3 deletions doc/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,13 @@ OpenPose - Release Notes
2. Eigen: From 3.3.4 to 3.3.8.
3. `wget` (Windows): From 1.19.1 to 1.20.3.
4. AppVeyor now tests the actual OpenPoseDemo.exe example (Windows).
5. Documentation improvements:
5. Added GitHub Actions (Workspaces) to test Ubuntu and Mac OSX versions (rather than the deprecated Travis).
6. Documentation improvements:
1. Highly simplified README.md.
2. Highly simplified doc, restructured to improve simplicity and now divided into subdirectories (`advanced`, `deprecated`, `installation`, etc).
3. More examples added to the demo quick start documentation.
6. Calibration doc links to included chessboard pdf.
7. Deprecated examples directories `tutorial_add_module` and `tutorial_api_thread` (and renamed as `deprecated`). They still compile, but we no longer support them.
7. Calibration doc links to included chessboard pdf.
8. Deprecated examples directories `tutorial_add_module` and `tutorial_api_thread` (and renamed as `deprecated`). They still compile, but we no longer support them.
2. Functions or parameters renamed:
3. Main bugs fixed:
1. Eigen working again on Windows.
Expand Down
11 changes: 9 additions & 2 deletions scripts/travis/configure_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ fi
echo "WITH_PYTHON = ${WITH_PYTHON}."
if [[ $WITH_PYTHON == true ]] ; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
ARGS="$ARGS -DBUILD_PYTHON=On -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7m.so"
ARGS="$ARGS -DBUILD_PYTHON=On"
if [[ $PYTHON3_VERSION ]] ; then
ARGS="$ARGS -DPYTHON_EXECUTABLE=/usr/bin/${PYTHON3_VERSION} -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/lib${PYTHON3_VERSION}m.so"
else
echo "No Python version defined (or unkown one used), using the default v2.7"
ARGS="$ARGS -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7m.so"
fi
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
ARGS="$ARGS -DBUILD_PYTHON=On -DPYTHON_EXECUTABLE=/usr/local/bin/python2.7 -DPYTHON_LIBRARY=/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7m.dylib"
fi
echo "Python arguments = $ARGS"
fi

# CUDA version
Expand Down Expand Up @@ -72,4 +79,4 @@ fi
# Run Cmake twice for pybind to register
if [[ $WITH_PYTHON == true ]] ; then
cmake .. $ARGS
fi
fi
2 changes: 1 addition & 1 deletion scripts/travis/install_deps_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [[ $WITH_CUDA == true ]]; then
bash $BASEDIR/../ubuntu/install_cuda.sh
fi
if [[ $WITH_CUDNN == true ]]; then
bash $BASEDIR/../ubuntu/install_cudnn.sh
bash $BASEDIR/../ubuntu/install_cudnn_up_to_Ubuntu16.sh
fi

bash $BASEDIR/../ubuntu/install_deps.sh
Expand Down
7 changes: 6 additions & 1 deletion scripts/travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ if [[ $RUN_EXAMPLES == true ]] ; then

# Python examples
if [[ $WITH_PYTHON == true ]] ; then
if [[ $PYTHON3_VERSION ]] ; then
PYTHON_COMMAND=python3
else
PYTHON_COMMAND=python
fi
echo "Tutorial API Python: OpenPose demo..."
cd build/examples/tutorial_api_python
python openpose_python.py --image_dir ../../../examples/media/ --net_resolution -1x32 --write_json output/ --write_images output/ --display 0
${PYTHON_COMMAND} openpose_python.py --image_dir ../../../examples/media/ --net_resolution -1x32 --write_json output/ --write_images output/ --display 0
echo " "
# Note: All Python examples require GUI
fi
Expand Down
Loading

0 comments on commit 59a29ea

Please sign in to comment.