mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 22:18:36 +08:00
enh: Update docker Makefile to use only the visible GPUs of machine (#4097)
Update Makefile Signed-off-by: Venky Ganesh <23023424+venkywonka@users.noreply.github.com>
This commit is contained in:
parent
62cfe74f5f
commit
a7c50cc426
@ -107,7 +107,15 @@ endef
|
||||
|
||||
DOCKER_RUN_OPTS ?= --rm -it --ipc=host --ulimit memlock=-1 --ulimit stack=67108864
|
||||
DOCKER_RUN_ARGS ?=
|
||||
GPU_OPTS ?= --gpus=all
|
||||
# Check if NVIDIA_VISIBLE_DEVICES is set and not empty
|
||||
NVIDIA_VISIBLE_DEVICES_VAL = $(shell echo $$NVIDIA_VISIBLE_DEVICES)
|
||||
ifeq ($(NVIDIA_VISIBLE_DEVICES_VAL),)
|
||||
# If empty or not set, use all GPUs
|
||||
GPU_OPTS ?= --gpus=all
|
||||
else
|
||||
# If set, use the specified devices
|
||||
GPU_OPTS ?= --gpus='"device=$(NVIDIA_VISIBLE_DEVICES_VAL)"'
|
||||
endif
|
||||
SOURCE_DIR ?= $(shell readlink -f ..)
|
||||
CODE_DIR ?= /code/tensorrt_llm
|
||||
CCACHE_DIR ?= ${CODE_DIR}/cpp/.ccache
|
||||
|
||||
Loading…
Reference in New Issue
Block a user