-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NVIDIA Driver * fixing chmod * hmmm * script should be executable derp * labels * tag requires ubuntu18.04 * fixing tag * dirty image wouldnt work w/ operator
- Loading branch information
1 parent
e0d8e4a
commit e05cef8
Showing
10 changed files
with
583 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: "NVIDIA Driver" | ||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
paths: | ||
- 'nvidia-driver/*' | ||
- .github/workflows/nvidia-driver-build.yml | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'nvidia-driver/*' | ||
- .github/workflows/nvidia-driver-build.yml | ||
jobs: | ||
ci: | ||
runs-on: ubuntu-18.04 | ||
name: CI | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: extract versions | ||
id: versions | ||
run: | | ||
version=$(cat VERSION) | ||
echo "::set-output name=git-tag::nvidia-driver-v${version}" | ||
echo "::set-output name=version::v${version}" | ||
echo "::set-output name=image-version::v${version}-ubuntu18.04" | ||
echo "::set-output name=dirty-image-version::v${version}-$(git rev-parse --short HEAD)-ubuntu18.04" | ||
working-directory: nvidia-driver | ||
|
||
- name: docker login | ||
uses: azure/docker-login@v1 | ||
with: | ||
login-server: ghcr.io | ||
username: hfuss | ||
password: ${{ secrets.PACKAGES_TOKEN }} | ||
|
||
- name: build and test | ||
run: | | ||
docker build . -t ghcr.io/hfuss/nvidia-driver:${{ steps.versions.outputs.dirty-image-version }} | ||
docker push ghcr.io/hfuss/nvidia-driver:${{ steps.versions.outputs.dirty-image-version }} | ||
working-directory: nvidia-driver | ||
|
||
- name: enforce new version | ||
run: | | ||
git ls-remote --exit-code origin --tags '${{ steps.versions.outputs.git-tag }}' && found=true | ||
if [[ "${found}" == "true" ]]; then | ||
echo "${{ steps.versions.outputs.git-tag }} tag already exists, please update the version and changelog" | ||
exit 1 | ||
fi | ||
- name: enforce changelog | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: dangoslen/changelog-enforcer@v2 | ||
with: | ||
changeLogPath: 'nvidia-driver/CHANGELOG.md' | ||
skipLabels: 'Skip-Changelog' | ||
expectedLatestVersion: ${{ steps.versions.outputs.version }} | ||
|
||
- name: extract changelog | ||
id: changelog | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
validation_depth: 10 | ||
version: ${{ steps.versions.outputs.version }} | ||
path: nvidia-driver/CHANGELOG.md | ||
|
||
- name: tag images | ||
run: | | ||
docker tag ghcr.io/hfuss/nvidia-driver:${{ steps.versions.outputs.dirty-image-version }} ghcr.io/hfuss/nvidia-driver:${{ steps.versions.outputs.image-version }} | ||
docker tag ghcr.io/hfuss/nvidia-driver:${{ steps.versions.outputs.dirty-image-version }} ghcr.io/hfuss/nvidia-driver:latest | ||
- name: promote images | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
docker push ghcr.io/hfuss/nvidia-driver:${{ steps.versions.outputs.image-version }} | ||
docker push ghcr.io/hfuss/nvidia-driver:latest | ||
- name: git release | ||
uses: actions/create-release@v1 | ||
if: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ steps.versions.outputs.git-tag }} | ||
release_name: NVIDIA Driver ${{ steps.versions.outputs.version }} Release | ||
body: ${{ steps.changelog.outputs.changes }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.3.0 | ||
0.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# CHANGELOG | ||
|
||
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | ||
|
||
## Unreleased | ||
### Added | ||
- ... | ||
|
||
### Changed | ||
- ... | ||
|
||
### Removed | ||
- ... | ||
|
||
### Dependencies | ||
- ... | ||
|
||
## [v0.1.0] | ||
### Added | ||
- Custom NVIDIA driver image | ||
|
||
### Dependencies | ||
- Base image `docker.io/nvidia/cuda:11.2-base-ubuntu18.04` | ||
- NVIDIA Driver `460.32.03` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/getting-started.html#install-the-gpu-operator | ||
# https://gitlab.com/nvidia/container-images/driver/-/blob/b9736822af4c0530c80db3335c0ecbd5ac36d4c8/ubuntu18.04/ | ||
FROM docker.io/nvidia/cuda:11.2.0-base-ubuntu18.04 | ||
LABEL [email protected] | ||
LABEL org.opencontainers.image.source=https://github.com/hfuss/ethernetes | ||
|
||
RUN dpkg --add-architecture i386 && \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
kmod \ | ||
libc6:i386 \ | ||
libelf-dev \ | ||
libglvnd-dev\ | ||
pkg-config && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main universe" > /etc/apt/sources.list && \ | ||
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-updates main universe" >> /etc/apt/sources.list && \ | ||
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-security main universe" >> /etc/apt/sources.list && \ | ||
usermod -o -u 0 -g 0 _apt | ||
|
||
RUN curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \ | ||
curl -fsSL -o /usr/local/bin/extract-vmlinux https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux && \ | ||
chmod +x /usr/local/bin/donkey /usr/local/bin/extract-vmlinux | ||
|
||
#ARG BASE_URL=http://us.download.nvidia.com/XFree86/Linux-x86_64 | ||
ARG BASE_URL=https://us.download.nvidia.com/tesla | ||
ARG DRIVER_VERSION=460.32.03 | ||
ENV DRIVER_VERSION=$DRIVER_VERSION | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install the userspace components and copy the kernel module sources. | ||
RUN cd /tmp && \ | ||
curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-x86_64-$DRIVER_VERSION.run && \ | ||
sh NVIDIA-Linux-x86_64-$DRIVER_VERSION.run -x && \ | ||
cd NVIDIA-Linux-x86_64-$DRIVER_VERSION* && \ | ||
./nvidia-installer --silent \ | ||
--no-kernel-module \ | ||
--install-compat32-libs \ | ||
--no-nouveau-check \ | ||
--no-nvidia-modprobe \ | ||
--no-rpms \ | ||
--no-backup \ | ||
--no-check-for-alternate-installs \ | ||
--no-libglx-indirect \ | ||
--no-install-libglvnd \ | ||
--x-prefix=/tmp/null \ | ||
--x-module-path=/tmp/null \ | ||
--x-library-path=/tmp/null \ | ||
--x-sysconfig-path=/tmp/null && \ | ||
mkdir -p /usr/src/nvidia-$DRIVER_VERSION && \ | ||
mv LICENSE mkprecompiled kernel /usr/src/nvidia-$DRIVER_VERSION && \ | ||
sed '9,${/^\(kernel\|LICENSE\)/!d}' .manifest > /usr/src/nvidia-$DRIVER_VERSION/.manifest && \ | ||
rm -rf /tmp/* | ||
|
||
COPY nvidia-driver /usr/local/bin | ||
WORKDIR /usr/src/nvidia-$DRIVER_VERSION | ||
|
||
ARG PUBLIC_KEY=empty | ||
COPY ${PUBLIC_KEY} kernel/pubkey.x509 | ||
|
||
ENTRYPOINT ["nvidia-driver", "init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |
Empty file.
Oops, something went wrong.