-
Notifications
You must be signed in to change notification settings - Fork 20
gitlab ci
!!! this page is just working scratch notes - not really useful to anyone !!!
CI is being handled manually by MR approvers/mergers. Gitlab will gain the capability to CI un-merged code from forks in Q1/Q2 of next year.
- Right now, CI runners must run from the forked repos, not from asgard/asgard. See Pipelines for Merge Requests issue 23902
- update the packages:
apt update
- install with
apt install lxd lxd-client
- configure with
sudo lxd init
- join the group:
newgrp lxd
- create container with
lxc launch ubuntu:18.04 asgard-ci
- confirm it is there
lxc list
Reference: LXD getting started - CLI
- enter the container:
lxc exec asgard-ci -- sudo --login --user ubuntu
- update the container:
apt update
- install the runner:
apt install gitlab-runner
- install other needed components:
apt install cmake clang-format gcc g++ gfortran clang-7
Reference: Install GitLab Runner
- within the container:
sudo gitlab-runner register
- follow the prompts
- use "https://code.ornl.gov/" for the url
- get the token from the gitlab web UI
- make it specific to the project
- shell executor type
Reference: Registering Runners
References
can try a simpler LXC approach: http://slightlybetter.eu/category/devops/lxc/
install cuda inside lxc on fusiont5 (roughly following https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation)
from nvidia repo
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
dpkg -i cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
apt update
apt install cuda-demo-suite-10-0 --no-install-recommends
- if dpkg errors about overwriting libs, answer with
apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
from ubuntu's graphics ppa
add-apt-repository ppa:graphics-drivers/ppa
apt update
apt install nvidia-headless-410
install cuda from runfile
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux
./cuda_10.0.130_410.48_linux
- yes to everything except driver install
- test with
/usr/local/cuda/extras/demo_suite/bandwidthTest
(will fail if no passthrough setup yet)
enable gpu passthrough for lxd (roughly following https://stgraber.org/2017/03/21/cuda-in-lxd/)
-
lxc config device add container-name gpu gpu
for all gpus -
lxc config device add container-name gpu gpu id=0
to pick the first gpu
moving to github necessitated using jenkins, at least temporarily.
- create 'jenkins' lxc container on fusiont5 and expose a port for the web interface
- install openjdk-8-jdk
- follow the instructions at https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu