This repository provides a Dockerfile for building a Docker image with DrSolver only.
Current DrPlotter Version: 1.0.3
To use a different version of DrPlotter, modify the download link in the Dockerfile (line 10):
# Line 10:
RUN wget -O drplotter.deb "https://github.com/Chia-Network/drplotter/releases/download/1.0.3/drplotter_1.0.3_amd64.deb"This guide provides instructions for cloning the drsolver-docker repository and running the container, assuming Docker is already installed on your system.
1. Clone the repository:
git clone https://github.com/imba-pericia/drsolver-docker.git2. Navigate to the cloned repository:
cd drsolver-docker3. Build the Docker image:
sudo docker build -t drsolver .This command builds a Docker image named drsolver using the Dockerfile in the current directory (.).
4. Run the Docker container:
docker run -it --gpus '"device=0,3,4"' -e DRSERVER_IP_ADDRESS=Your_drserver_ip_address:port drsolverThis command runs the drsolver image in an interactive terminal (-it) and exposes specific GPUs (--gpus '"device=0,3,4"'). It also sets an environment variable DRSERVER_IP_ADDRESS with the IP address and port of your DRSERVER. Replace Your_drserver_ip_address:port with the actual values.
Explanation of options:
-it: Runs the container in interactive mode with a pseudo-TTY.--gpus '"device=0,3,4"': Specifies the GPUs to be used by the container. You can list specific GPU IDs (e.g.,0,1,2), ranges (e.g.,0-2), or useallfor all available GPUs.-e DRSERVER_IP_ADDRESS=Your_drserver_ip_address:port: Sets the environment variableDRSERVER_IP_ADDRESSwith the IP address and port of your DRSERVER.--rm(optional): Automatically removes the container after it stops. Useful for temporary containers.--restart=always(optional): Automatically restarts the container if it fails or after the host reboots.--name <container_name>(optional): Assigns a specific name to the container.
Example with additional options:
docker run -it --gpus '"device=0"' --rm --restart=always -e DRSERVER_IP_ADDRESS=192.168.1.6:8080 drsolverThis example uses GPU with ID 0, automatically removes the container after it stops, and always restarts it. It sets the DRSERVER_IP_ADDRESS to 192.168.1.6:8080.
Customize the command with the appropriate options for your specific needs. You can combine and modify these options based on your requirements. Remember to replace placeholders like Your_drserver_ip_address:port with actual values.
Exiting and Re-entering Interactive Mode:
-
Exiting without stopping the container: Press
Ctrl+Pfollowed byCtrl+Qto detach from the container without stopping it. -
Re-entering the container: Use the following command to re-attach to the running container:
docker attach <container_id_or_name>Replace <container_id_or_name> with the ID or name of your container. You can find this information using docker ps.
1. Update the system:
sudo apt update
sudo apt upgrade2. Remove older versions of Docker (if any):
sudo apt-get remove docker docker-engine docker.io containerd runc3. Install required packages:
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release4. Add the GPG key for the official Docker repository:
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg5. Add the Docker stable repository:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null6. Update the package index:
sudo apt-get update7. Install Docker Engine, containerd, and Docker Compose:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin nvidia-docker28. Verify the Docker installation:
sudo docker run hello-worldIf you see a greeting message from Docker, the installation was successful.
9. (Optional) Add your user to the docker group to run without sudo:
sudo usermod -aG docker $USER10. Log out and back in (or reboot) to apply the group changes.
After completing these steps, Docker will be installed and ready to use.