2023-11-09 00:27:11 +03:00
|
|
|
VERSION = 6.20.0
|
|
|
|
CUDA_PLUGIN_VERSION=6.17.0
|
|
|
|
CUDA_VERSION=11-4
|
2023-11-09 12:01:57 +03:00
|
|
|
REL = $(VERSION)-local
|
2019-10-12 01:31:10 +03:00
|
|
|
THREADS = $(shell nproc)
|
|
|
|
PRIORITY = 0
|
2023-06-07 15:14:52 +03:00
|
|
|
REPO=docker.io/metal3d/xmrig
|
|
|
|
CC=podman
|
2019-10-12 01:31:10 +03:00
|
|
|
|
2019-10-12 02:06:57 +03:00
|
|
|
HUB=https://hub.docker.com/v2
|
2019-10-12 01:31:10 +03:00
|
|
|
|
|
|
|
all: build run
|
2019-10-10 19:21:47 +03:00
|
|
|
|
|
|
|
build:
|
2023-06-07 15:14:52 +03:00
|
|
|
$(CC) build -t $(REPO):$(REL) --build-arg VERSION=$(VERSION) .
|
|
|
|
$(CC) tag $(REPO):$(REL) $(REPO):latest
|
2019-10-10 19:21:47 +03:00
|
|
|
|
2023-11-09 00:27:11 +03:00
|
|
|
run: build
|
2023-06-07 15:14:52 +03:00
|
|
|
$(CC) run --rm -it -e THREADS=$(THREADS) -e PRIORITY=$(PRIORITY) $(REPO):$(REL)
|
2019-10-12 02:06:57 +03:00
|
|
|
|
2023-11-09 00:27:11 +03:00
|
|
|
run-cuda: build
|
|
|
|
$(CC) run \
|
|
|
|
--device nvidia.com/gpu=all \
|
|
|
|
--device /dev/cpu \
|
|
|
|
--device /dev/cpu_dma_latency \
|
|
|
|
--security-opt=label=disable \
|
|
|
|
--rm -it \
|
|
|
|
--cap-add=ALL \
|
|
|
|
--privileged \
|
|
|
|
-e THREADS=$(THREADS) \
|
|
|
|
-e PRIORITY=$(PRIORITY) \
|
|
|
|
-e CUDA=true \
|
|
|
|
-e NO_CPU=true \
|
|
|
|
$(REPO):$(REL)
|