Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dockerfiles/Dockerfile.nemo-skills
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ RUN apt-get update && \
curl \
wget \
git \
git-lfs && \
git-lfs \
ffmpeg && \
ln -s /usr/bin/python3 /usr/bin/python && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

Expand Down
5 changes: 5 additions & 0 deletions requirements/audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ jiwer>=3.1.0,<4.0.0 # Word/Character Error Rate computation
sacrebleu # BLEU score computation
soundfile # Audio file I/O for dataset preparation
whisper-normalizer # Lightweight text normalization (EnglishTextNormalizer)
# torchcodec requires FFmpeg shared libraries (not installable via pip).
# Install via system package manager before running pip install:
# Linux: sudo apt install ffmpeg
# macOS: brew install ffmpeg
torchcodec
Comment on lines +5 to +9
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all requirements files and check for torch version constraints
find . -name "*.txt" -path "*/requirements/*" -type f | head -20

Repository: NVIDIA-NeMo/Skills

Length of output: 254


🏁 Script executed:

#!/bin/bash
# Search for torch version constraints in requirements files
rg "torch" requirements/ --type txt -i

Repository: NVIDIA-NeMo/Skills

Length of output: 253


🏁 Script executed:

#!/bin/bash
# Check the structure of requirements directory
ls -la requirements/ 2>/dev/null || echo "No requirements directory at root"

Repository: NVIDIA-NeMo/Skills

Length of output: 755


🏁 Script executed:

#!/bin/bash
# Look for any documentation about installation/setup
find . -name "README*" -o -name "INSTALL*" -o -name "setup.py" -o -name "pyproject.toml" | head -20

Repository: NVIDIA-NeMo/Skills

Length of output: 504


🏁 Script executed:

#!/bin/bash
# Check the audio.txt file to see all dependencies and version constraints
cat -n requirements/audio.txt 2>/dev/null || echo "File not found"

Repository: NVIDIA-NeMo/Skills

Length of output: 610


🏁 Script executed:

#!/bin/bash
# Read main.txt to see torch version constraints
cat -n requirements/main.txt

Repository: NVIDIA-NeMo/Skills

Length of output: 1934


🏁 Script executed:

#!/bin/bash
# Check README for installation/setup instructions
cat README.md | head -100

Repository: NVIDIA-NeMo/Skills

Length of output: 8337


🏁 Script executed:

#!/bin/bash
# Look for Dockerfile or setup scripts that might handle GPU/CUDA installation
find . -name "Dockerfile*" -o -name "*setup*" -o -name "install*" | grep -v ".git" | head -20

Repository: NVIDIA-NeMo/Skills

Length of output: 341


🏁 Script executed:

#!/bin/bash
# Check if there's a Dockerfile that might document CUDA/GPU setup
find . -name "Dockerfile*" -type f

Repository: NVIDIA-NeMo/Skills

Length of output: 258


🌐 Web query:

torchcodec PyPI installation CPU GPU CUDA index-url

💡 Result:

  • CPU-only (from PyPI):

    pip install torchcodec

    This installs the CPU-only wheels by default. [1]

  • CUDA/GPU (Linux, from the PyTorch wheel index): install from the PyTorch CUDA-specific index matching the CUDA build you used for PyTorch, e.g. CUDA 12.6:

    pip install torchcodec --index-url https://download.pytorch.org/whl/cu126

    If you don’t pass --index-url, pip will install the CPU-only build. [2]

  • CUDA/GPU (Windows): GPU support is via conda-forge (experimental/beta):

    conda install -c conda-forge "torchcodec=*=*cuda*"

    [2]

Notes: TorchCodec relies on having FFmpeg installed (and for CUDA decoding, FFmpeg must be built with NVDEC support). [1][2]

Sources: [1] PyPI torchcodec page, [2] torchcodec GitHub README (Installing CUDA-enabled TorchCodec).


pip install -r requirements/audio.txt silently installs the CPU-only build of torchcodec.

Without the --index-url flag, pip defaults to the CPU-only wheels from PyPI. For GPU-accelerated decoding, the correct installation requires:

pip install torchcodec --index-url https://download.pytorch.org/whl/cu126

The CUDA suffix must match your PyTorch installation. Since pip requirements files cannot embed custom index URLs, add a clear note on the torchcodec line to warn users, and consider documenting the full GPU installation procedure in the README or a dedicated installation guide. The current comments only describe the FFmpeg system dependency, not the PyPI index requirement.

Additionally, add a version constraint to torchcodec to pin it alongside torch. Like other dependencies in this file, torchcodec has tight version coupling with PyTorch, and an unpinned version could break on future releases.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@requirements/audio.txt` around lines 5 - 9, The requirements entry for
torchcodec silently installs CPU-only wheels; update the torchcodec line in
requirements/audio.txt to include a clear inline note warning that GPU users
must install via the PyTorch wheel index (e.g., use pip install torchcodec
--index-url https://download.pytorch.org/whl/<cuda_suffix>) and add a version
pin to match the project's PyTorch version (e.g., pin to the same minor/patch
compatibility as torch) and also add a short README or installation-guide entry
explaining how to choose the correct <cuda_suffix> to match torch; target the
existing "torchcodec" line so reviewers can find and update it.