Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins integration #80

Merged
204 commits merged into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from 160 commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
8efc4f0
Hello-world jenkinsfile
dagardner-nv May 3, 2022
72acd3c
First pass at an actual build script
dagardner-nv May 3, 2022
e983a53
Remove library
dagardner-nv May 3, 2022
1eee682
Remove node?
dagardner-nv May 3, 2022
d436168
wip
dagardner-nv May 3, 2022
aa47524
wip
dagardner-nv May 3, 2022
d3fc2e3
wip
dagardner-nv May 3, 2022
f42e89e
wip
dagardner-nv May 3, 2022
9addaab
wip
dagardner-nv May 3, 2022
f19f0b7
wip
dagardner-nv May 3, 2022
8a9df70
wip
dagardner-nv May 3, 2022
b9e1789
wip
dagardner-nv May 3, 2022
9e00335
wip
dagardner-nv May 3, 2022
ab23a74
wip
dagardner-nv May 3, 2022
d41f226
wip
dagardner-nv May 3, 2022
ae9405e
wip
dagardner-nv May 3, 2022
4ddcf4a
wip
dagardner-nv May 3, 2022
20ef4d7
wip
dagardner-nv May 3, 2022
0787457
wip
dagardner-nv May 3, 2022
efec6aa
wip
dagardner-nv May 4, 2022
eca671e
wip
dagardner-nv May 4, 2022
c82e377
wip
dagardner-nv May 4, 2022
989f15c
wip
dagardner-nv May 4, 2022
b52e53a
wip
dagardner-nv May 4, 2022
9f1933d
wip
dagardner-nv May 4, 2022
b68ea44
wip
dagardner-nv May 4, 2022
a5924c6
wip
dagardner-nv May 4, 2022
2794fb4
wip
dagardner-nv May 4, 2022
90badb7
wip
dagardner-nv May 4, 2022
0dd380a
wip
dagardner-nv May 4, 2022
d344d0d
wip
dagardner-nv May 5, 2022
64f1083
wip
dagardner-nv May 6, 2022
cb33924
wip
dagardner-nv May 6, 2022
9d14d32
wip
dagardner-nv May 6, 2022
b5be80b
wip
dagardner-nv May 6, 2022
5bd6968
wip
dagardner-nv May 6, 2022
0e3d673
wip
dagardner-nv May 6, 2022
dbd14e9
wip
dagardner-nv May 6, 2022
ed9645a
wip
dagardner-nv May 6, 2022
023180d
wip
dagardner-nv May 6, 2022
5f489a7
wip
dagardner-nv May 6, 2022
a69265b
wip
dagardner-nv May 6, 2022
ab898e8
Build is working along with a long todo list:
dagardner-nv May 6, 2022
6244cf0
Clean the ws
dagardner-nv May 6, 2022
1afea1d
wip
dagardner-nv May 6, 2022
0a22c2d
First pass attempt at using sccache
dagardner-nv May 6, 2022
8a522cc
wip
dagardner-nv May 6, 2022
be89a85
wip
dagardner-nv May 6, 2022
5244dd1
Disable sccache debug logging
dagardner-nv May 6, 2022
c271acc
no-build-id
dagardner-nv May 6, 2022
f3a9544
Add aws cli
dagardner-nv May 6, 2022
6432664
wip
dagardner-nv May 6, 2022
bbaab85
wip
dagardner-nv May 6, 2022
01fe70c
wip
dagardner-nv May 6, 2022
e028236
wip
dagardner-nv May 6, 2022
625c013
wip
dagardner-nv May 6, 2022
538e19f
WIP
dagardner-nv May 9, 2022
e94f659
WIP
dagardner-nv May 9, 2022
3256997
WIP
dagardner-nv May 9, 2022
0e56b92
WIP
dagardner-nv May 9, 2022
0dc4edf
WIP
dagardner-nv May 9, 2022
0a38170
WIP
dagardner-nv May 9, 2022
e613ff9
WIP
dagardner-nv May 9, 2022
5c2bbca
WIP
dagardner-nv May 9, 2022
9adeea3
WIP
dagardner-nv May 9, 2022
ddca7d5
WIP
dagardner-nv May 9, 2022
0960a54
WIP
dagardner-nv May 9, 2022
ce6577f
WIP
dagardner-nv May 9, 2022
02ff4dd
WIP
dagardner-nv May 9, 2022
bf7f32f
WIP
dagardner-nv May 9, 2022
f78aa4e
WIP
dagardner-nv May 9, 2022
2c3082c
WIP
dagardner-nv May 9, 2022
57ea894
WIP
dagardner-nv May 9, 2022
9a544bc
WIP
dagardner-nv May 9, 2022
8ce942c
WIP
dagardner-nv May 9, 2022
276b65f
WIP
dagardner-nv May 9, 2022
fbed9a9
WIP
dagardner-nv May 9, 2022
f0dbfb0
WIP
dagardner-nv May 9, 2022
a424bcb
WIP
dagardner-nv May 9, 2022
0650df5
WIP
dagardner-nv May 9, 2022
1eff2fc
WIP
dagardner-nv May 9, 2022
d3d2479
WIP
dagardner-nv May 9, 2022
8ffe22a
WIP
dagardner-nv May 9, 2022
3d3f0e6
WIP
dagardner-nv May 10, 2022
476fee1
WIP
dagardner-nv May 10, 2022
214e5d4
WIP
dagardner-nv May 10, 2022
7228033
WIP
dagardner-nv May 10, 2022
6ffbf38
WIP
dagardner-nv May 10, 2022
7027cac
WIP
dagardner-nv May 10, 2022
8be0462
WIP
dagardner-nv May 10, 2022
a6d2efd
WIP
dagardner-nv May 10, 2022
5186d32
WIP
dagardner-nv May 10, 2022
6c3c82a
WIP
dagardner-nv May 10, 2022
5e2e343
WIP
dagardner-nv May 10, 2022
47dcbdc
Dont perform an in-place editable build
dagardner-nv May 10, 2022
93d352f
WIP
dagardner-nv May 10, 2022
ff56256
Add check stage
dagardner-nv May 10, 2022
8f267c7
Add check stage
dagardner-nv May 10, 2022
69ac9fc
wip
dagardner-nv May 10, 2022
5124d80
wip
dagardner-nv May 10, 2022
00f88c6
wip
dagardner-nv May 10, 2022
7ee9f4a
wip
dagardner-nv May 10, 2022
4bf88f2
wip
dagardner-nv May 10, 2022
cbe5427
wip
dagardner-nv May 10, 2022
04641a2
wip
dagardner-nv May 10, 2022
e22fb84
wip
dagardner-nv May 10, 2022
33daa7a
test copyright
dagardner-nv May 10, 2022
4287ab8
Revert "test copyright"
dagardner-nv May 10, 2022
d040e15
Test python checks
dagardner-nv May 10, 2022
be0617d
wip
dagardner-nv May 10, 2022
165e0b3
Revert "Test python checks"
dagardner-nv May 10, 2022
a7ba5c1
wip
dagardner-nv May 11, 2022
acbae0f
wip
dagardner-nv May 11, 2022
5028d78
wip
dagardner-nv May 11, 2022
d0a1018
wip
dagardner-nv May 11, 2022
943e613
Dont exit early on failed tests
dagardner-nv May 11, 2022
a35407a
wip
dagardner-nv May 11, 2022
071680b
wip
dagardner-nv May 11, 2022
a69f852
wip
dagardner-nv May 11, 2022
4cbc675
wip
dagardner-nv May 11, 2022
63bd891
wip
dagardner-nv May 11, 2022
d0b3c83
wip
dagardner-nv May 11, 2022
9fc9b18
wip
dagardner-nv May 11, 2022
b0624f6
wip
dagardner-nv May 11, 2022
66fb4c8
wip
dagardner-nv May 11, 2022
2e91fdb
wip
dagardner-nv May 11, 2022
1c8a895
wip
dagardner-nv May 11, 2022
3696825
wip
dagardner-nv May 11, 2022
d59d821
wip
dagardner-nv May 11, 2022
d06c714
wip
dagardner-nv May 11, 2022
ab887c9
Use -driver variant
dagardner-nv May 12, 2022
87db77d
wip
dagardner-nv May 12, 2022
1e9040b
wip
dagardner-nv May 12, 2022
ce02944
wip
dagardner-nv May 12, 2022
c733303
wip
dagardner-nv May 12, 2022
a0f4f10
wip
dagardner-nv May 12, 2022
7fcec06
wip
dagardner-nv May 12, 2022
adb235f
wip
dagardner-nv May 12, 2022
52ef83f
add conda build
dagardner-nv May 12, 2022
ea4cc3a
Respect the PARALLEL_LEVEL in build
dagardner-nv May 12, 2022
e40ed1a
Revert debug changes
dagardner-nv May 12, 2022
5e56ffd
Disable ccache when using sccache
dagardner-nv May 12, 2022
fff04ca
use bz2
dagardner-nv May 12, 2022
bcd4181
Formatting fix
dagardner-nv May 12, 2022
a4a4ba4
Merge branch 'branch-22.06' into david-ci
dagardner-nv May 12, 2022
658c352
Generate a coverage report as well as a junit report
dagardner-nv May 12, 2022
86cad99
Increase time limit for build, a clean build will require 1h40m
dagardner-nv May 12, 2022
2011982
Disable morpheus conda build for now
dagardner-nv May 12, 2022
97a480d
wip
dagardner-nv May 12, 2022
8490157
Revert to trying the gpu build to see if this fixes the cudf issue
dagardner-nv May 12, 2022
35ec5fd
wip
dagardner-nv May 12, 2022
6a08821
Revert "Revert to trying the gpu build to see if this fixes the cudf …
dagardner-nv May 12, 2022
fbe61a4
wip
dagardner-nv May 12, 2022
b7f728e
wip
dagardner-nv May 13, 2022
bd68189
Probably don't need the pip install
dagardner-nv May 13, 2022
ac68342
Revert "Probably don't need the pip install"
dagardner-nv May 13, 2022
86cdb73
Doc builds need the workspace to be reinstalled
dagardner-nv May 13, 2022
beb0d33
Fix docs
dagardner-nv May 13, 2022
5314415
Use the rapidsai-driver for cpu-only stages
dagardner-nv May 13, 2022
5161d30
wip
dagardner-nv May 13, 2022
2bcf000
Fix type-o
dagardner-nv May 16, 2022
14e83a9
Cleanup redundant environment declarations
dagardner-nv May 16, 2022
bcd1d68
Remove externalDelete statements
dagardner-nv May 16, 2022
58393e8
Revert "Remove externalDelete statements"
dagardner-nv May 16, 2022
4a908fe
Revert "Revert "Remove externalDelete statements""
dagardner-nv May 16, 2022
bcf4029
Add disableDeferredWipeout
dagardner-nv May 16, 2022
0b1da07
wip
dagardner-nv May 16, 2022
821c32c
wip
dagardner-nv May 16, 2022
45ceea5
Revert "wip"
dagardner-nv May 16, 2022
07d47c0
Revert "wip"
dagardner-nv May 16, 2022
e43ac1b
Revert "Add disableDeferredWipeout"
dagardner-nv May 16, 2022
da71025
Revert "Revert "Revert "Remove externalDelete statements"""
dagardner-nv May 16, 2022
3e19ae7
tmp debugging
dagardner-nv May 16, 2022
bbd6646
tmp debugging
dagardner-nv May 16, 2022
cd6f0bf
npm missing?
dagardner-nv May 16, 2022
93bfb7d
I don't know anymore
dagardner-nv May 16, 2022
b014c32
Debugging npm issue
dagardner-nv May 17, 2022
520da8a
Don't install camouflage-server globally
dagardner-nv May 17, 2022
4a22c29
Add some debug statements, I suspect its a permissions issue that I c…
dagardner-nv May 17, 2022
9a7f1cb
Add some debug statements, I suspect its a permissions issue that I c…
dagardner-nv May 17, 2022
336fb2d
whoami doesn't work
dagardner-nv May 17, 2022
ff4e1b0
Set permissions to be the same on extract
dagardner-nv May 17, 2022
5cfbea3
wip
dagardner-nv May 17, 2022
9c584f7
wip
dagardner-nv May 17, 2022
9779786
wip
dagardner-nv May 17, 2022
c190638
Try and set the global npm dir to temp
dagardner-nv May 17, 2022
977bc34
Fix the setting of the home env var
dagardner-nv May 17, 2022
4580eee
Merge branch 'branch-22.06' into david-ci
dagardner-nv May 17, 2022
a2123f5
Add comment explaining why we are setting LD_LIBRARY_PATH
dagardner-nv May 17, 2022
ff81939
Add missing dep
dagardner-nv May 17, 2022
afe84b0
For now it appears that adding the pyi files to the build requires a …
dagardner-nv May 17, 2022
d1ff412
wip
dagardner-nv May 17, 2022
f36b40f
Update ci/scripts/jenkins_common.sh
dagardner-nv May 17, 2022
1bfd77f
Loosen the version reqs
dagardner-nv May 17, 2022
79ec3a7
Merge branch 'david-ci' of github.com:dagardner-nv/Morpheus into davi…
dagardner-nv May 17, 2022
a1dabeb
Move jenkins scripts to their own dir, remove relative paths using MO…
dagardner-nv May 18, 2022
f2c0ec9
Use workspace var in jenkinsfile
dagardner-nv May 18, 2022
a921800
Use a gpu node for building docs
dagardner-nv May 18, 2022
35937c3
wip
dagardner-nv May 18, 2022
3cb19de
Merge branch 'branch-22.06' into david-ci
dagardner-nv May 23, 2022
8d09585
Remove old comment block
dagardner-nv May 23, 2022
80b6a0b
Use local instead of file url
dagardner-nv May 23, 2022
469d84f
Redirect sccache --zero-stats to dev/null
dagardner-nv May 23, 2022
1a93052
Rename CONDA_BLD_DIR to CUDF_CONDA_BLD_DIR to eliminate confusion wit…
dagardner-nv May 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
pipeline {
agent any
options {
disableConcurrentBuilds(abortPrevious: true)
}
stages {
stage('Checks & Builds') {
failFast true
parallel {
stage('Check') {
options {
timeout(time: 1, unit: 'HOURS')
}
environment {
HOME = "${WORKSPACE}"
}
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
agent {
docker {
image 'gpuci/rapidsai-driver:21.10-cuda11.4-devel-ubuntu20.04-py3.8'
label 'cpu'
}
}
steps {
cleanWs(
deleteDirs: true,
externalDelete: 'sudo rm -rf %s'
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
)
checkout scm
sh "./ci/scripts/jenkins_checks.sh"
}
}
stage('Build:linux:x86_64:gcc') {
options {
timeout(time: 4, unit: 'HOURS')
}
environment {
PARALLEL_LEVEL = '16'
PYTHON_VER = '3.8'
RAPIDS_VER = '21.10'
CUDA_VER = '11.4'
USE_SCCACHE = '1'
HOME = "${WORKSPACE}"
}
agent {
docker {
image 'gpuci/rapidsai-driver:21.10-cuda11.4-devel-ubuntu20.04-py3.8'
label 'cpu4'
}
}
steps {
cleanWs(
deleteDirs: true,
externalDelete: 'sudo rm -rf %s'
)
checkout scm
withCredentials([[
$class: 'AmazonWebServicesCredentialsBinding',
credentialsId: "aws-s3-gpuci",
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
]])
{
sh "./ci/scripts/jenkins_build.sh"
}
}
}
}
}
stage('Post Build Stages') {
failFast true
parallel {
stage('Test') {
options {
timeout(time: 1, unit: 'HOURS')
}
environment {
PYTHON_VER = '3.8'
RAPIDS_VER = '21.10'
CUDA_VER = '11.4'
HOME = "${WORKSPACE}"
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
}
agent {
docker {
image 'gpuci/rapidsai:21.10-cuda11.4-devel-ubuntu20.04-py3.8'
label 'driver-495'
args '--runtime "nvidia" -e "NVIDIA_VISIBLE_DEVICES=$EXECUTOR_NUMBER"'
}
}
steps {
cleanWs(
deleteDirs: true,
externalDelete: 'sudo rm -rf %s'
)
checkout scm
withCredentials([[
$class: 'AmazonWebServicesCredentialsBinding',
credentialsId: "aws-s3-gpuci",
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
]])
{
sh "./ci/scripts/jenkins_test.sh"
}
}
}
stage('Docutation') {
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
options {
timeout(time: 1, unit: 'HOURS')
}
environment {
HOME = "${WORKSPACE}"
}
agent {
docker {
image 'gpuci/rapidsai:21.10-cuda11.4-devel-ubuntu20.04-py3.8'
label 'driver-495'
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
args '--runtime "nvidia" -e "NVIDIA_VISIBLE_DEVICES=$EXECUTOR_NUMBER"'
}
}
steps {
cleanWs(
deleteDirs: true,
externalDelete: 'sudo rm -rf %s'
)
checkout scm
withCredentials([[
$class: 'AmazonWebServicesCredentialsBinding',
credentialsId: "aws-s3-gpuci",
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
]])
{
sh "./ci/scripts/jenkins_docs.sh"
}
}
}
}
}
}
post {
always {
cleanWs(
deleteDirs: true,
externalDelete: 'sudo rm -rf %s'
)
}
}
}
4 changes: 2 additions & 2 deletions ci/conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ requirements:
- {{ compiler("cxx") }}
- ccache
host:
- protobuf
- protobuf=3.19
- python {{ python }}
- cython >=0.29,<0.30
- setuptools
Expand All @@ -65,7 +65,7 @@ requirements:
- cudatoolkit {{ cuda_version }}
- rapidjson=1.1
run:
- protobuf
- protobuf=3.19
- python
- typing_extensions
- pandas >=1.0,<1.4.0dev0
Expand Down
9 changes: 8 additions & 1 deletion ci/conda/recipes/morpheus/morpheus_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
CMAKE_ARGS=${CMAKE_ARGS:-""}

export CCACHE_BASEDIR=$(realpath ${SRC_DIR}/..)
export USE_SCCACHE=${USE_SCCACHE:-""}

# Check for some neo environment variables. Append to front of args to allow users to overwrite them
if [[ -n "${MORPHEUS_CACHE_DIR}" ]]; then
Expand All @@ -36,7 +37,13 @@ CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=$PREFIX ${CMAKE_ARGS}"
CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
CMAKE_ARGS="-DBUILD_SHARED_LIBS=ON ${CMAKE_ARGS}"
CMAKE_ARGS="-DMORPHEUS_USE_CONDA=ON ${CMAKE_ARGS}"
CMAKE_ARGS="-DMORPHEUS_USE_CCACHE=ON ${CMAKE_ARGS}"

if [[ "${USE_SCCACHE}" == "" ]]; then
CMAKE_ARGS="-DMORPHEUS_USE_CCACHE=ON ${CMAKE_ARGS}"
else
CMAKE_ARGS="-DMORPHEUS_USE_CCACHE=OFF ${CMAKE_ARGS}"
fi

dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
CMAKE_ARGS="-DMORPHEUS_BUILD_PYTHON=ON ${CMAKE_ARGS}"
CMAKE_ARGS="-DMORPHEUS_PYTHON_INPLACE_BUILD=ON ${CMAKE_ARGS}"
CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES=-"ALL"} ${CMAKE_ARGS}"
Expand Down
23 changes: 17 additions & 6 deletions ci/conda/recipes/run_conda_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export NEO_GIT_TAG=${NEO_GIT_TAG:-"5b55e37c6320c1a5747311a1e29e7ebb049d12bc"}

# Set CONDA_CHANNEL_ALIAS to mimic the conda config channel_alias property during the build
CONDA_CHANNEL_ALIAS=${CONDA_CHANNEL_ALIAS:-""}
export USE_SCCACHE=${USE_SCCACHE:-""}

export CUDA="$(conda list | grep cudatoolkit | egrep -o "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")"
export PYTHON_VER="$(python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")"
Expand All @@ -48,21 +49,31 @@ echo "PYTHON_VER : ${PYTHON_VER}"
echo "NEO_GIT_TAG : ${NEO_GIT_TAG}"
echo ""

export CMAKE_GENERATOR="Ninja"

# Export variables for the cache
export MORPHEUS_CACHE_DIR=${MORPHEUS_CACHE_DIR:-"${MORPHEUS_ROOT}/.cache"}

# Export CCACHE variables
export CCACHE_DIR="${MORPHEUS_CACHE_DIR}/ccache"
export CCACHE_NOHASHDIR=1
export CMAKE_GENERATOR="Ninja"
export CMAKE_C_COMPILER_LAUNCHER="ccache"
export CMAKE_CXX_COMPILER_LAUNCHER="ccache"
export CMAKE_CUDA_COMPILER_LAUNCHER="ccache"

# Ensure the necessary folders exist before continuing
mkdir -p ${MORPHEUS_CACHE_DIR}
mkdir -p ${CCACHE_DIR}

# Local builds use ccache
# ci builds will use sccache which is a ccache work-alike but uses an S3 backend
# (https://github.com/mozilla/sccache)
if [[ "${USE_SCCACHE}" == "" ]]; then
# Export CCACHE variables
export CMAKE_C_COMPILER_LAUNCHER="ccache"
export CMAKE_CXX_COMPILER_LAUNCHER="ccache"
export CMAKE_CUDA_COMPILER_LAUNCHER="ccache"
else
export CMAKE_C_COMPILER_LAUNCHER="sccache"
export CMAKE_CXX_COMPILER_LAUNCHER="sccache"
export CMAKE_CUDA_COMPILER_LAUNCHER="sccache"
fi

# Holds the arguments in an array to allow for complex json objects
CONDA_ARGS_ARRAY=()

Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export PY_DIRS="${PY_ROOT} ci/scripts"
export YAPF_EXCLUDE_FLAGS="-e ${PY_ROOT}/versioneer.py -e ${PY_ROOT}/morpheus/_version.py"

# Determine the commits to compare against. If running in CI, these will be set. Otherwise, diff with main
export BASE_SHA=${CI_MERGE_REQUEST_DIFF_BASE_SHA:-${BASE_SHA:-main}}
export COMMIT_SHA=${CI_COMMIT_SHA:-${COMMIT_SHA:-HEAD}}
export BASE_SHA=${CHANGE_TARGET:-${BASE_SHA:-main}}
export COMMIT_SHA=${GIT_COMMIT:-${COMMIT_SHA:-HEAD}}

export CPP_FILE_REGEX='^(\.\/)?(src|include|tests|benchmarks|python)\/.*\.(cc|cpp|h|hpp)$'
export PYTHON_FILE_REGEX='^(\.\/)?(?!\.|build).*\.(py|pyx|pxd)$'
Expand Down
134 changes: 134 additions & 0 deletions ci/scripts/jenkins_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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

source ci/scripts/jenkins_common.sh
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Creating conda env"
conda config --add pkgs_dirs /opt/conda/pkgs
conda config --env --add channels conda-forge
conda config --env --set channel_alias ${CONDA_CHANNEL_ALIAS:-"https://conda.anaconda.org"}
mamba install -q -y -n base -c conda-forge "boa >=0.10"
mamba create -q -y -n morpheus python=${PYTHON_VER}
conda activate morpheus

gpuci_logger "Installing CI dependencies"
mamba env update -q -n morpheus -f ./docker/conda/environments/cuda${CUDA_VER}_ci.yml
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Check versions"
python3 --version
gcc --version
g++ --version

gpuci_logger "Check conda environment"
conda info
conda config --show-sources
conda list --show-channel-urls

gpuci_logger "Checking S3 cuDF cache"
CONDA_BLD_DIR=/opt/conda/conda-bld
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
CUDF_CONDA_COMMIT=$(git log -n 1 --pretty=format:%H -- ci/conda)
CUDF_CONDA_CACHE_PATH="/cudf/${CUDA_VER}/${PYTHON_VER}/${RAPIDS_VER}/${CUDF_CONDA_COMMIT}/${NVARCH}/cudf_conda.tar.bz"
CUDF_CONDA_CACHE_URL="${S3_URL}${CUDF_CONDA_CACHE_PATH}"
CUDF_CONDA_TAR="${WORKSPACE_TMP}/cudf_conda.tar.bz"

echo "Checking ${DISPLAY_URL}${CUDF_CONDA_CACHE_PATH}"
set +e
aws s3 cp --no-progress ${CUDF_CONDA_CACHE_URL} ${CUDF_CONDA_TAR}
CUDF_CACHE_CHECK=$?
set -e

if [[ "${CUDF_CACHE_CHECK}" != "0" ]]; then
gpuci_logger "Cache miss, Building cuDF"
mkdir -p ${CONDA_BLD_DIR}
# The --no-build-id bit is needed for sccache
CONDA_ARGS="--no-build-id --output-folder ${CONDA_BLD_DIR} --skip-existing --no-test" ${MORPHEUS_ROOT}/ci/conda/recipes/run_conda_build.sh libcudf cudf

gpuci_logger "sccache usage for cudf build:"
sccache --show-stats
ZS=$(sccache --zero-stats)
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Archiving cuDF build"
cd $(dirname ${CONDA_BLD_DIR})
tar cfj ${CUDF_CONDA_TAR} $(basename ${CONDA_BLD_DIR})
cd -
aws s3 cp --no-progress ${CUDF_CONDA_TAR} ${CUDF_CONDA_CACHE_URL}
else
gpuci_logger "Cache hit, using cached cuDF"
cd $(dirname ${CONDA_BLD_DIR})
tar xf ${CUDF_CONDA_TAR}
cd -
fi
mdemoret-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Installing cuDF"
mamba install -q -y -c file://${CONDA_BLD_DIR} -c nvidia -c rapidsai -c conda-forge libcudf cudf
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Installing other dependencies"
mamba env update -q -n morpheus -f ./docker/conda/environments/cuda${CUDA_VER}_dev.yml
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Check cmake & ninja"
cmake --version
ninja --version

gpuci_logger "Configuring cmake for Morpheus"
cmake -B build -G Ninja \
-DCMAKE_MESSAGE_CONTEXT_SHOW=ON \
-DMORPHEUS_BUILD_BENCHMARKS=ON \
-DMORPHEUS_BUILD_EXAMPLES=ON \
-DMORPHEUS_BUILD_TESTS=ON \
-DMORPHEUS_USE_CONDA=ON \
-DMORPHEUS_PYTHON_INPLACE_BUILD=ON \
-DMORPHEUS_USE_CCACHE=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=sccache \
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved
.

gpuci_logger "Building Morpheus"
cmake --build build -j --parallel ${PARALLEL_LEVEL}

gpuci_logger "sccache usage for morpheus build:"
sccache --show-stats

gpuci_logger "Installing Morpheus"
pip install -e ${MORPHEUS_ROOT}

gpuci_logger "Archiving results"
mamba pack --quiet --force --ignore-editable-packages --ignore-missing-files --n-threads ${PARALLEL_LEVEL} -n morpheus -o ${WORKSPACE_TMP}/conda_env.tar.gz
tar cfj ${WORKSPACE_TMP}/workspace.tar.bz --exclude=".git" --exclude="models" --exclude=".cache" ./
ls -lh ${WORKSPACE_TMP}/
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Pushing results to ${DISPLAY_ARTIFACT_URL}"
aws s3 cp --no-progress "${WORKSPACE_TMP}/conda_env.tar.gz" "${ARTIFACT_URL}/conda_env.tar.gz"
aws s3 cp --no-progress "${WORKSPACE_TMP}/workspace.tar.bz" "${ARTIFACT_URL}/workspace.tar.bz"

# gpuci_logger "Running conda build for morpheus"
# ZS=$(sccache --zero-stats)
# CONDA_ARGS="--no-build-id --output-folder ${CONDA_BLD_DIR} --no-test" ${MORPHEUS_ROOT}/ci/conda/recipes/run_conda_build.sh morpheus

# gpuci_logger "sccache usage for morpheus conda build:"
# sccache --show-stats

# gpuci_logger "Archiving conda builds"
# tar cfj ${WORKSPACE_TMP}/conda_build.tar.bz ${CONDA_BLD_DIR}
# ls -lh ${WORKSPACE_TMP}/

# gpuci_logger "Pushing conda builds to ${DISPLAY_ARTIFACT_URL}"
# aws s3 cp --no-progress "${WORKSPACE_TMP}/conda_build.tar.bz" "${ARTIFACT_URL}/conda_build.tar.bz"
dagardner-nv marked this conversation as resolved.
Show resolved Hide resolved

gpuci_logger "Success"
exit 0
Loading