AcademySoftwareFoundation / AcademySoftwareFoundation/aswf-docker

Nvidia ENTRYPOINT script pollutes stdout

Open
#203 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
189
Forks
42
Avg merge
9h 38m
Merged PRs (30d)
6

Description

The upstream `nvidia/cuda` images use [a script](https://gitlab.com/nvidia/container-images/cuda/-/blob/master/nvidia_entrypoint.sh) in their [Docker image ENTRYPOINT](https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.5.1/rockylinux8/runtime/Dockerfile) that prints a banner before `exec`uting any command.

This banner is printed to stdout. This is annoying when running a command via a temporary container where the stdout is important (e.g. is expected to be structured output such as XML).

**Steps to reproduce**

```
$ docker run --rm aswf/ci-base:2024.1 echo "MY MESSAGE" > message.txt
$ cat message.txt

==========
== CUDA ==
==========

CUDA Version 12.3.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.
Use the NVIDIA Container Toolkit to start this container with GPU support; see
https://docs.nvidia.com/datacenter/cloud-native/ .

MY MESSAGE
```

**Mitigation**

If inheriting from the image in a new `Dockerfile` then `ENTRYPOINT []` can be used to override and disable the entrypoint script.

If running from the command-line then you can use `--entrypoint ""` to achieve the same effect.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the repository's Docker image definitions and ENTRYPOINT settings, then reproduce the behavior with the documented `docker run --rm aswf/ci-base:2024.1 echo "MY MESSAGE"` command. Done means commands run in the image no longer receive the NVIDIA banner on stdout, while the intended command output remains available there.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.