Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
12e220b7
Unverified
Commit
12e220b7
authored
Oct 26, 2020
by
Nikita Titov
Committed by
GitHub
Oct 26, 2020
Browse files
setup CUDA CI job (#3424)
* setup CUDA CI job * minor updates
parent
c07644d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
.ci/setup.sh
.ci/setup.sh
+7
-0
.github/workflows/cuda.yml
.github/workflows/cuda.yml
+63
-0
No files found.
.ci/setup.sh
View file @
12e220b7
...
@@ -36,6 +36,13 @@ else # Linux
...
@@ -36,6 +36,13 @@ else # Linux
mv
$AMDAPPSDK_PATH
/lib/x86_64/sdk/
*
$AMDAPPSDK_PATH
/lib/x86_64/
mv
$AMDAPPSDK_PATH
/lib/x86_64/sdk/
*
$AMDAPPSDK_PATH
/lib/x86_64/
echo
libamdocl64.so
>
$OPENCL_VENDOR_PATH
/amdocl64.icd
echo
libamdocl64.so
>
$OPENCL_VENDOR_PATH
/amdocl64.icd
fi
fi
if
[[
$TASK
==
"cuda"
]]
;
then
apt-get update
apt-get
install
--no-install-recommends
-y
curl wget
curl
-sL
https://cmake.org/files/v3.18/cmake-3.18.1-Linux-x86_64.sh
-o
cmake.sh
chmod
+x cmake.sh
./cmake.sh
--prefix
=
/usr/local
--exclude-subdir
fi
if
[[
$TRAVIS
==
"true"
]]
||
[[
$GITHUB_ACTIONS
==
"true"
]]
;
then
if
[[
$TRAVIS
==
"true"
]]
||
[[
$GITHUB_ACTIONS
==
"true"
]]
;
then
wget
-q
-O
conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget
-q
-O
conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
fi
...
...
.github/workflows/cuda.yml
0 → 100644
View file @
12e220b7
name
:
CUDA GitHub Actions
on
:
pull_request_review_comment
:
types
:
[
created
]
jobs
:
test
:
name
:
CUDA
runs-on
:
[
self-hosted
,
linux
]
if
:
github.event.comment.body == '/gha run cuda-builds' && contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association)
timeout-minutes
:
60
strategy
:
fail-fast
:
false
steps
:
-
name
:
Setup or update software on host machine
run
:
|
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
apt-transport-https \
ca-certificates \
curl \
git \
gnupg-agent \
software-properties-common \
wget
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y
curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -sL https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
containerd.io \
docker-ce \
docker-ce-cli \
nvidia-docker2
sudo systemctl restart docker
-
name
:
Remove old folder with repository
run
:
sudo rm -rf $GITHUB_WORKSPACE
-
name
:
Checkout repository
uses
:
actions/checkout@v1
with
:
fetch-depth
:
5
submodules
:
true
-
name
:
Test CUDA
run
:
|
export ROOT_DOCKER_FOLDER=/LightGBM
cat > docker.env <<EOF
TASK=cuda
COMPILER=gcc
GITHUB_ACTIONS=true
OS_NAME=linux
BUILD_DIRECTORY=$ROOT_DOCKER_FOLDER
CONDA_ENV=test-env
EOF
cat > docker-script.sh <<EOF
export CONDA=\$HOME/miniconda
export PATH=\$CONDA/bin:\$PATH
nvidia-smi
$ROOT_DOCKER_FOLDER/.ci/setup.sh || exit -1
$ROOT_DOCKER_FOLDER/.ci/test.sh || exit -1
EOF
sudo docker run --env-file docker.env -v "$GITHUB_WORKSPACE":"$ROOT_DOCKER_FOLDER" --rm --gpus all nvidia/cuda:11.0-devel-ubuntu20.04 /bin/bash $ROOT_DOCKER_FOLDER/docker-script.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment