Closed ir0nt0ad closed 4 years ago
Hi @sh0gg0th, This is not currently supported, and I probably don't intend to add it. I usually just write a wrapper scrip in bash for this sort of thing:
#!/usr/bin/env bash
set -eu
MEDIA_ROOT="$HOME/videos"
OUTPUT_ROOT="$HOME/flow"
shopt -s globstar
mkdir -p "$OUTPUT_ROOT"
for f in "$MEDIA_ROOT"/**/*.mp4; do
relative_path="${f#$MEDIA_ROOT/}"
docker run \
-it \
--rm \
--runtime=nvidia \
--mount type=bind,source="$MEDIA_ROOT",target=/data/input \
--mount type=bind,source="$OUTPUT_ROOT",target=/data/output \
willprice/flowty tvl1 \
"/data/input/${relative_path}" \
"/data/output/${relative_path%%.mp4}/{axis}/{index:05d}.jpg" \
--cuda
done
Hope that helps.
@willprice understood, thanks. Would it make sense to run a looping script from within the container instead, or there's not a lot of overhead involved in running the container every time?
Yeah sure, you could modify the script and mount it inside too, that would work well and avoid the additional container startup times, although typically its ~100ms or so which is usually neglible compared to the overall flow computation time.
I see, thanks again!
Is this currently supported? *.mp4 threw an error for me.