forked from Clarifai/coreos-nvidia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_container_build.sh
executable file
·41 lines (32 loc) · 948 Bytes
/
_container_build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
# Default: use binary packages instead of building everything from source
EMERGE_SOURCE_FLAGS=gK
while :; do
case $1 in
--emerge-sources)
EMERGE_SOURCE_FLAGS=
;;
*)
break
esac
shift
done
VERSION=$1
echo Building ${VERSION}
function finish {
cat /nvidia_installers/NVIDIA-Linux-x86_64-${VERSION}/nvidia-installer.log
}
set -e
trap finish exit
emerge-gitclone
. /usr/share/coreos/release
git -C /var/lib/portage/coreos-overlay checkout build-${COREOS_RELEASE_VERSION%%.*}
emerge -${EMERGE_SOURCE_FLAGS}q --jobs 4 --load-average 4 coreos-sources
cd /usr/src/linux
cp /lib/modules/*-coreos*/build/.config .config
make olddefconfig
make modules_prepare
cd /nvidia_installers/NVIDIA-Linux-x86_64-${VERSION}
./nvidia-installer -s -n --kernel-source-path=/usr/src/linux \
--no-check-for-alternate-installs --no-opengl-files \
--kernel-install-path=${PWD} --log-file-name=${PWD}/nvidia-installer.log