sundapeng 1a768bc837 dev_1.0.0_sundp_2 优化Argus-metric模块的e2e部署测试流程 (#27)
Co-authored-by: sundapeng.sdp <sundapeng@hashdata.cn>
Reviewed-on: #27
Reviewed-by: yuyr <yuyr@zgclab.edu.cn>
Reviewed-by: xuxt <xuxt@zgclab.edu.cn>
2025-10-17 17:15:55 +08:00

40 lines
833 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用NVIDIA官方CUDA基础镜像
FROM nvidia/cuda:12.2.2-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
# 设置时区
ENV TZ=Asia/Shanghai
RUN apt-get update -qq && \
apt-get install -y -qq \
tzdata \
curl \
wget \
gnupg2 \
software-properties-common \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 配置时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
# 创建启动脚本在运行时验证GPU
COPY <<EOF /app/start.sh
#!/bin/bash
echo "检查GPU环境..."
if command -v nvidia-smi &> /dev/null; then
nvidia-smi
echo "GPU环境正常"
else
echo "警告: nvidia-smi 命令不可用请确保容器运行时启用了GPU支持"
fi
exec "\$@"
EOF
RUN chmod +x /app/start.sh
CMD ["/app/start.sh", "/bin/bash"]