Installing emrys


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


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

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

$ curl -fsSL | \
   sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \

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


# Add the package repositories
$ curl -s -L | \
   sudo apt-key add -
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L$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 | \
   sudo tar -C /usr/local/bin -xzf -

# test the installation
$ emrys --help

# enable docker user re-mapping

Updating emrys

$ sudo emrys update