Giter Site home page Giter Site logo

coreos-nvidia's Introduction

coreos-nvidia

Simplified building of NVIDIA drivers for CoreOS Linux

This set of scripts will cross-build a given version of NVIDIA drivers for a given version of CoreOS. It does so by running the build inside the developer container image associated with the OS version, i.e. using the same compiler toolchain and kernel configuration used by the system. The scripts can be started from a machine running any kind of Linux distribution: it doesn't have to be CoreOS.

Requirements:

  • any Linux distribution
  • systemd-nspawn (tested on version 229, there might be issues with <= 225)
  • sudo, to run systemd-nspawn
  • curl
  • bzip2 and bunzip2
  • about 4GB of scratch disk space, most of it taken by the uncompressed developer image

Usage:

build.sh [--keep] DRIVER_VERSION CHANNEL COREOS_VERSION

e.g.

./build.sh 367.27 alpha 1097.0.0

The scripts will download both the official NVIDIA archive and the CoreOS developer images, caching them afterwards. If you pass the --keep flag, the temporary container used for building will be preserved after the run; this is helpful for debugging purposes. The scripts will then create three archives:

libraries-[DRIVER_VERSION].tar.bz2
tools-[DRIVER_VERSION].tar.bz2
modules-[COREOS_VERSION]-[DRIVER_VERSION].tar.bz2

Getting the libraries, tools and modules onto final systems, as well as creating device nodes under /dev/, depends a lot on their particular provisioning (cloud-config, Ansible, etc.), so it is left as an exercise to the reader. A few tips:

  • on CoreOS, /lib64/, /usr/lib64/ and co. all reside on a read-only filesystem. You might need to create a new directory elsewhere and its location listed in a file under /etc/ld.so.conf.d/
  • depending on your intepretation of FHS specifications, directories under /opt/ or /srv/ might be an option. /opt/bin/ is already in users' search path, the PATH variable.

Automating driver builds for new OS releases

Another script, check.sh, can be run as a cron job to automatically build drivers for new versions of CoreOS as they get released.

Usage

./check.sh DRIVER_VERSION COREOS_CHANNELS

where COREOS_CHANNELS defaults to "alpha beta stable". Example:

./check.sh 367.27 "beta stable"

The first time, it will build drivers for the most recent release of each given channel. Upon subsequent invocations, it will build only newer releases it hasn't built before โ€” and still only the most recent one per channel. The script expects to live in a writable directory which is persisted across runs and includes the other scripts.

coreos-nvidia's People

Contributors

therc avatar

Watchers

James Cloos avatar Jim Huang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.