File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 258258if [ " $AUDIO_URL " != " " ]; then
259259 curl -L $AUDIO_URL -o ${MODEL_DIR} /$AUDIO_FILE
260260elif [[ " $MODEL_NAME " == * whisper* ]] || [ " $MODEL_NAME " = " voxtral_realtime" ]; then
261- conda install -y -c conda-forge ffmpeg
261+ if ! command -v ffmpeg > /dev/null; then
262+ if [ " $( uname -s) " = " Linux" ] && command -v apt-get > /dev/null; then
263+ if [ " $( id -u) " -eq 0 ]; then
264+ apt-get update
265+ apt-get install -y --no-install-recommends ffmpeg
266+ else
267+ sudo apt-get update
268+ sudo apt-get install -y --no-install-recommends ffmpeg
269+ fi
270+ else
271+ conda install -y -c conda-forge ffmpeg
272+ fi
273+ fi
262274 pip install datasets soundfile
263275 # We pushd'd into EXECUTORCH_ROOT above, so torch_pin is importable here.
264276 TORCHCODEC_PKG=$( python -c " from torch_pin import torchcodec_spec; print(torchcodec_spec())" )
You can’t perform that action at this time.
0 commit comments