Git Product home page Git Product logo

ansible-role-cuda's Introduction

Build Status Galaxy Role

ansible-role-cuda

Installs CUDA

Tested with Tesla P100, K80, Tesla M40, CentOS7, Ubuntu 16.04, Cuda 7.5 and 8.0

Optionally also installs cuda_init which initializes the GPUs during boot.

Requirements

Outbound access to http://developer.download.nvidia.com/compute/cuda/repos/

Role Variables

gpu: False
cuda_packages:
 - cuda
cuda_restart_node_on_install: True
cuda_init: True
cuda_bash_profile: True
  • gpu: True is needed. Without it this role does nothing.
  • cuda_packages: List that can be updated to include more packages that are installed after nvidia cuda repo is installed, or to a specific cuda version like cuda_packages: [ "cuda=10.0.130-1" ]
  • cuda_init: Installs a bash script that is executed via systemd
  • cuda_gpu_name0: "/dev/nvidia0" # set this to the device ansible looks for. If it does not exist then if cuda_init is True then it will run the cuda_init.sh script
  • cuda_restart_node_on_install: restarts the system when packages are installed or updated

Example Playbook

Ubuntu playbook.yml:

- name: install a cuda with a specific version
  hosts: deep_learning
  vars:
    - cuda_packages:
        - cuda=10.0.130-1
  roles:
    - fgci.cuda

RHEL/CentOS playbook.yml:

- name: install a cuda with a specific version
  hosts: deep_learning
  vars:
    - cuda_packages:
        - cuda-10-2
  roles:
    - fgci.cuda

inventory:

[deep_learning]
host1.example gpu=True

Example Errors

This error means you are not using a supported OS (like Ubuntu 18.10 which does not have a cuda URL)

   "msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"

Tests in playbook

Tests are using this one: https://github.com/lae/ansible-role-travis-lxc

License

MIT

Author Information

ansible-role-cuda's People

Contributors

aethylred avatar easybe avatar jabl avatar lae avatar martbhell avatar mhakala avatar simo-tuomisto avatar stefanfluit avatar tiggi avatar villes1 avatar

Watchers

 avatar

Forkers

jaredeh

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.