dgx-spark-playbooks/nvidia/stack-sparks/assets/docker-compose.yml
2025-10-03 20:46:11 +00:00

62 lines
1.7 KiB
YAML

#!/bin/bash
#
# SPDX-FileCopyrightText: Copyright (c) 1993-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.8'
services:
trtllm:
image: nvcr.io/nvidia/tensorrt-llm/release:1.0.0rc3
deploy:
replicas: 2
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
resources:
reservations:
generic_resources:
- discrete_resource_spec:
kind: 'NVIDIA_GPU'
value: 1
environment:
- UCX_NET_DEVICES=enp1s0f0np0,enp1s0f1np1
- NCCL_SOCKET_IFNAME=enp1s0f0np0,enp1s0f1np1
- OMPI_MCA_btl_tcp_if_include=enp1s0f0np0,enp1s0f1np1
- OMPI_MCA_orte_default_hostfile=/etc/openmpi-hostfile
- OMPI_MCA_rmaps_ppr_n_pernode=1
- OMPI_ALLOW_RUN_AS_ROOT=1
- OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
entrypoint: /opt/trtllm-mn-entrypoint.sh
volumes:
- ~/.cache/huggingface/:/root/.cache/huggingface/
- ~/trtllm-mn-entrypoint.sh:/opt/trtllm-mn-entrypoint.sh
- ~/.ssh:/tmp/.ssh:ro
ulimits:
memlock: -1
stack: 67108864
networks:
- host
networks:
host:
name: host
external: true