# Docker

Docker (opens new window) provides application containers for Linux.

TIP

If you need to run docker images on home machine try using Singularity instead. Read more in our Singularity installation guide.

# Installation

Follow official Docker installation guide (opens new window) if you want to install Docker on Iaas or Blue machine.

GPU machines. come with nvidia-docker preinstalled.

# Moving docker directory

  1. Stop docker service and migrate files:
sudo service docker stop

sudo rsync -avu /var/lib/docker/ /home/docker
  1. Edit /etc/docker/daemon.json and add data-root path:
sudo vim /etc/docker/daemon.json

Example for IAAS / Blue machines:

{
    "data-root": "/home/docker",
}

Example for GPU machines:

{
    "data-root": "/home/docker",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}
  1. Backup original Docker files:
sudo mv /var/lib/docker /var/lib/docker.backup
  1. Restart Docker service:
sudo service docker restart
  1. Test Docker command:
docker ps -a

# Troubleshooting installation of pip packages

Add mtu size configuration in docker config:

sudo vim /etc/docker/daemon.json

Example configuration setting mtu to 1330 to avoid all possible issues with packet sizes:

{
    "data-root": "/home/docker",
    "mtu": 1330
}