Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AlexeyAB/darknet
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed Jun 11, 2021
2 parents 67543e2 + 894aada commit 108c8cf
Show file tree
Hide file tree
Showing 19 changed files with 1,131 additions and 629 deletions.
209 changes: 161 additions & 48 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Darknet Continuous Integration

on: [push, workflow_dispatch]
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

env:
VCPKG_BINARY_SOURCES: 'clear;nuget,vcpkgbinarycache,readwrite'
Expand All @@ -17,24 +21,13 @@ jobs:
run: sudo apt install libopencv-dev

- name: 'Install CUDA'
run: ./scripts/deploy-cuda.sh

- name: 'Create softlinks for CUDA'
run: |
sudo apt update
sudo apt-get dist-upgrade -y
sudo wget -O /etc/apt/preferences.d/cuda-repository-pin-600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/ /"
sudo apt-get install -y --no-install-recommends cuda-compiler-11-2 cuda-libraries-dev-11-2 cuda-driver-dev-11-2 cuda-cudart-dev-11-2
sudo apt-get install -y --no-install-recommends libcudnn8-dev
sudo rm -rf /usr/local/cuda
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so
sudo ln -s /usr/local/cuda-11.2 /usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
nvcc --version
gcc --version
- name: 'LIBSO=1 GPU=0 CUDNN=0 OPENCV=0'
run: |
Expand Down Expand Up @@ -72,37 +65,26 @@ jobs:
make clean
ubuntu-vcpkg-cuda:
ubuntu-vcpkg-opencv4-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- uses: lukka/get-cmake@latest

- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install yasm nasm

- uses: lukka/get-cmake@latest

- name: 'Install CUDA'
run: ./scripts/deploy-cuda.sh

- name: 'Create softlinks for CUDA'
run: |
sudo apt update
sudo apt-get dist-upgrade -y
sudo wget -O /etc/apt/preferences.d/cuda-repository-pin-600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/ /"
sudo apt-get install -y --no-install-recommends cuda-compiler-11-2 cuda-libraries-dev-11-2 cuda-driver-dev-11-2 cuda-cudart-dev-11-2
sudo apt-get install -y --no-install-recommends libcudnn8-dev
sudo rm -rf /usr/local/cuda
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so
sudo ln -s /usr/local/cuda-11.2 /usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
nvcc --version
gcc --version
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
Expand All @@ -123,7 +105,7 @@ jobs:
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -DisableInteractive -DoNotUpdateDARKNET
run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateDARKNET

- uses: actions/upload-artifact@v2
with:
Expand All @@ -143,6 +125,92 @@ jobs:
path: ${{ github.workspace }}/uselib*


ubuntu-vcpkg-opencv3-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- uses: lukka/get-cmake@latest

- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install yasm nasm

- name: 'Install CUDA'
run: ./scripts/deploy-cuda.sh

- name: 'Create softlinks for CUDA'
run: |
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -ForceOpenCVVersion 3 -DisableInteractive -DoNotUpdateDARKNET


ubuntu-vcpkg-opencv2-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- uses: lukka/get-cmake@latest

- name: Update apt
run: sudo apt update
- name: Install dependencies
run: sudo apt install yasm nasm

- name: 'Install CUDA'
run: ./scripts/deploy-cuda.sh

- name: 'Create softlinks for CUDA'
run: |
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so
- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
env:
CUDACXX: "/usr/local/cuda/bin/nvcc"
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ./build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -ForceOpenCVVersion 2 -DisableInteractive -DoNotUpdateDARKNET


ubuntu:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -195,24 +263,13 @@ jobs:
- uses: lukka/get-cmake@latest

- name: 'Install CUDA'
run: ./scripts/deploy-cuda.sh

- name: 'Create softlinks for CUDA'
run: |
sudo apt update
sudo apt-get dist-upgrade -y
sudo wget -O /etc/apt/preferences.d/cuda-repository-pin-600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/ /"
sudo apt-get install -y --no-install-recommends cuda-compiler-11-2 cuda-libraries-dev-11-2 cuda-driver-dev-11-2 cuda-cudart-dev-11-2
sudo apt-get install -y --no-install-recommends libcudnn8-dev
sudo rm -rf /usr/local/cuda
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/stubs/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so.1
sudo ln -s /usr/local/cuda-11.2/lib64/stubs/libcuda.so /usr/local/cuda-11.2/lib64/libcuda.so
sudo ln -s /usr/local/cuda-11.2 /usr/local/cuda
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH
nvcc --version
gcc --version
- name: 'Build'
shell: pwsh
Expand All @@ -221,7 +278,7 @@ jobs:
CUDA_PATH: "/usr/local/cuda"
CUDA_TOOLKIT_ROOT_DIR: "/usr/local/cuda"
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ./build.ps1 -EnableOPENCV -EnableCUDA -DisableInteractive -DoNotUpdateDARKNET
run: ./build.ps1 -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateDARKNET

- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -253,6 +310,28 @@ jobs:
run: ./build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateDARKNET


ubuntu-setup-sh:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json ;
mono $(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Setup'
shell: bash
run: ./scripts/setup.sh -InstallCUDA -BypassDRIVER


osx-vcpkg:
runs-on: macos-latest
steps:
Expand Down Expand Up @@ -419,6 +498,28 @@ jobs:
path: ${{ github.workspace }}/uselib*


win-setup-ps1:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source http://93.49.111.10:5555/v3/index.json ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source http://93.49.111.10:5555/v3/index.json
- name: 'Setup'
shell: pwsh
run: ./scripts/setup.ps1 -InstallCUDA


win-intlibs-cpp:
runs-on: windows-latest
steps:
Expand All @@ -431,6 +532,18 @@ jobs:
run: ./build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateDARKNET


win-csharp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- uses: lukka/get-cmake@latest

- name: 'Build'
shell: pwsh
run: ./build.ps1 -EnableCSharpWrapper -DisableInteractive -DoNotUpdateDARKNET


win-intlibs-cuda:
runs-on: windows-latest
steps:
Expand Down
Loading

0 comments on commit 108c8cf

Please sign in to comment.