Skip to content

Consider using CoreOS developer container #8

@therc

Description

@therc

See https://gist.github.com/marineam/9914debc25c8d7dc458f
It uses the same toolchain as the one that built the CoreOS kernel and it doesn't require running Ubuntu. I haven't tested it, but I think the current approach results in a much larger driver image than necessary.

Perhaps this approach would work, for a given CoreOS release XYZ:

  1. Grab cuda_*run and extract it to a directory on the host machine. You can't do that inside the container, because it doesn't have enough space to download the archive, let alone expand it, etc.
  2. Prepare a shell script to be run on the target nodes, which performs sanity checks, then runs insmod
  3. Run container version XYZ using systemd-nspawn, adding --bind for the cuda directory, the script and any other files/directories needed. Make nspawn run a Makefile or similar (CoreOS doesn't ship with Make, but the container does!), which perhaps outputs a tar file with just the driver, a shell script and maybe insmod
  4. Run docker import to create a Docker image from the tarball (which can be piped), with version XYZ and the shell script as the entrypoint
  5. ???
  6. Profit!

What do you think? There'd be no Dockerfile left, at the end, but it might be worth it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions