Docker Installation and NVIDIA GPU Configuration
Complete Docker and NVIDIA GPU configuration before beginning mining with the EMC client.
1. Docker Installation and Setup
1.1 Docker Installation and Verification
#Install Docker :
# Docker Installation
sudo apt-get install docker.io
#Docker Verification Installation Success:
# Refer Docker Version
docker version
# Check for Multiple Docker Installations
which docker

The image above shows that Docker is installed successfully.
1.2 Docker Daemon Remote Access
The Docker Daemon is a core component of Docker, running in the background and managing requests from the Docker Client. The Docker Client interacts with Docker Daemon via the command line to perform Docker operations.The Docker Daemon listens on a specific port for requests from the Docker Client. It creates and runs jobs based on the request type to pull images, start containers, and stop containers.
Modify docker.service File to Open Port 2375
To facilitate EMC test mining, open TCP port 2375 for Docker Daemon. This allows it to listen and create jobs.
For more information, visit: https://docs.docker.com/engine/daemon/remote-access/
The docker.service
file is located in the systemd folder. To configure it by modifying docker.service
, first check if your system uses systemd.
stat /sbin/init

As shown in the image, the system uses systemd.
Proceed by using the following command to modify the docker.service
file:
sudo vim /lib/systemd/system/docker.service

As shown in the image, add -H tcp://127.0.0.1:2375
to the specified location in the file. Press ESC
, then type :wq
to save and exit.
Use systemctl
to reload the Docker Daemon
and apply the changes:
Systemctl provides a set of subcommands to manage a single unit, with the command format: systemctl [command] [unit].
sudo systemctl daemon-reload
sudo systemctl unmask docker.service
sudo systemctl unmask docker.socket
Restart Docker service:
sudo systemctl restart docker.service

The image shows that if the Docker service runs as expected after modifying the docker.service
unit, the modification is successful. If issues occur, examine the modification process for errors.
Verify if port 2375 is open
Enter the following command in the cloud server terminal:
netstat -apn | grep 2375

As shown in the image, port TCP 2375 is open, and Docker Daemon is listening.
2. NVIDIA GPU configuration
Configure the NVIDIA GPU on the cloud server to enable seamless GPU usage within containers for optimal performance.
2.1 NVIDIA Container Runtime Installation and Usage
With NVIDIA Container Runtime, users register a new runtime during container creation to expose NVIDIA GPUs to applications within the container.
#Add Library
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
#Install nvidia-container-runtime
sudo apt-get install nvidia-container-runtime
systemctl restart docker
#Ensure successful installation
sudo docker run --gpus all --rm nvidia/cuda:12.0.1-base-ubuntu22.04 nvidia-smi
Note:The command should match your Ubuntu version. For more details, visit: NVIDIA CUDA Containers.: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda

As shown in the image, the NVIDIA Container Runtime installation is successful.
You have successfully completed all the necessary steps for the EMC testnet mining setup.
Last updated