[Error] Distrobox fails to create nvidia container
- 主要語言
- Go
- 星號
- 13k
- 分支
- 541
- 平均合併
- 20 小時 47 分鐘
- 30 天內合併 PR
- 4
描述
**Describe the bug**
When trying to build distrobox, it fails with error
```
Creating 'cuda-dev' using image docker.io/pytorch/pytorch:2.8.0-cuda12.6-cudnn9-devel /usr/bin/distrobox-create: eval: line 1072: syntax error near unexpected token `('
/usr/bin/distrobox-create: eval: line 1072: `========== == CUDA == ========== CUDA Version 12.6.3 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/ . podman create --hostname "bazzite" --name "cuda-dev" --privileged --security-opt label=disable --security-opt apparmor=unconfined --pids-limit=-1 --user root:root --ipc host --network host --label "manager=distrobox" --label "distrobox.unshare_groups=1" --env "SHELL=zsh" --env "HOME=/home/bazzite" --env "container=podman" --env "TERMINFO_DIRS=/usr/share/terminfo:/run/host/usr/share/terminfo" --env "CONTAINER_ID=cuda-dev" --volume /tmp:/tmp:rslave --volume "/usr/bin/distrobox-init":/usr/bin/entrypoint:ro --volume "/usr/bin/distrobox-export":/usr/bin/distrobox-export:ro --volume "/usr/bin/distrobox-host-exec":/usr/bin/distrobox-host-exec:ro --volume "/home/bazzite":"/home/bazzite":rslave --volume /:/run/host/:rslave --volume /dev:/dev:rslave --volume /sys:/sys:rslave --volume /dev/pts --volume /dev/null:/dev/ptmx --volume /sys/fs/selinux --volume /var/log/journal --volume "/var/home/bazzite":"/var/home/bazzite":rslave --volume /etc/hosts:/etc/hosts:ro --volume /etc/resolv.conf:/etc/resolv.conf:ro --volume /etc/hostname:/etc/hostname:ro --runtime=crun --annotation run.oci.keep_original_groups=1 --ulimit host --systemd=always --userns keep-id:size=65536 --entrypoint /usr/bin/entrypoint docker.io/pytorch/pytorch:2.8.0-cuda12.6-cudnn9-devel --verbose --name "bazzite" --user 1000 --group 1000 --home "/home/bazzite" --init "1" --nvidia "1" --pre-init-hooks "" --additional-packages " systemd dbus dbus-user-session iproute2 procps" -- '''
```
It seems to be trying to eval the banner of Nvidia containers.
**To Reproduce**
distrobox.ini
```
[cuda-dev]
image=docker.io/pytorch/pytorch:2.8.0-cuda12.6-cudnn9-devel
nvidia=true
init=true
additional_packages="systemd dbus dbus-user-session iproute2 procps"
```
command
```
distrobox-assemble create --file ./distrobox.ini
```
**Expected behavior**
Distrobox created without error
**Desktop (please complete the following information):**
versions:
distrobox: 1.8.2.0
Linux bazzite 6.17.7-ba13.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 14 20:03:53 UTC 2025 x86_64 GNU/Linux
podman version 5.6.2
貢獻指南
研究方向
/usr/bin/distrobox-create 的第 1072 行發生錯誤,其中 eval 命令因 NVIDIA 容器橫幅而遇到語法錯誤。首先檢查該行附近的 distrobox-create 指令碼,以了解它如何處理容器輸出。尋找當 nvidia=true 時,指令碼如何處理容器橫幅或初始輸出。使用一個簡單的容器進行測試,以確認問題是否特定於 pytorch 映像。修正可能涉及在 eval 之前篩選或跳脫橫幅文字。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- bash, docker, shell
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100