Installation

Installing emrys

Requirements

General
Ubuntu 16.04. May work with other versions or OSes, but hasn’t been tested. Experiment at your own risk.

User
None

Supplier
Docker # Uninstall old versions $ sudo apt remove docker docker-engine docker.io

$ sudo apt update
$ sudo apt install \
   apt-transport-https \
   ca-certificates \
   curl \
   software-properties-common

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
   sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

$ sudo apt update
$ sudo apt install -y docker-ce


Nvidia-Docker

# Add the package repositories
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
   sudo apt-key add -
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
   sudo tee /etc/apt/sources.list.d/nvidia-docker.list
$ sudo apt update

# Install nvidia-docker2 and reload the Docker daemon configuration
$ sudo apt install -y nvidia-docker2
$ sudo systemctl restart docker.service


Add user re-mapping for security. All containers are executed as unprivileged users with all linux capabilities dropped and the no-new-privileges security flag enabled. In the unlikely event the process were to escalate itself to a privileged user within the container, the docker user re-mapping means the process is still unprivileged on your host machine.

# manually add "userns-remap": "default" to /etc/docker/daemon.json
# After, it should look like: 
$ sudo cat /etc/docker/daemon.json
{
  "userns-remap": "default",
  "runtimes": {
    "nvidia": {
      "path": "nvidia-container-runtime",
      "runtimeArgs": []
    }
  }
}

# restart dockerd for the changes to take effect
$ sudo systemctl restart docker.service


GPU cooling

# allows user to adjust gpu fan speed
$ sudo nvidia-xconfig -a --enable-all-gpus
$ sudo nvidia-xconfig -a --cool-bits=24

# must reboot

# test
$ nvidia-settings -a GPUFanControlState=1
$ nvidia-settings -a GPUTargetFanSpeed=25

GPUs heat up quickly when running at high utilization. Settings your GPUs fan control state to manual allows emrys to ramp up your fan appropriately during & between jobs. Keeping your cards relatively cool reduces wear and tear.

Downloading & installing emrys

$ curl -O https://www.emrys.io/download/emrys_u0.3.0_m0.3.0.tar.gz | \
   sudo tar -C /usr/local/bin -xzf -

# test the installation
$ emrys --help

# enable docker user re-mapping

Updating emrys

$ sudo emrys update