Install Deno so yt-dlp can extract YouTube
yt-dlp warns that extraction without a JavaScript runtime is deprecated and some formats are missing; Deno is its default runtime for that work. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
1 parent
835ede2a41
commit
97c5746b4d
1 file changed
+13
-1
@@ -11,8 +11,11 @@ FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
|
||||
ARG IMAGEMAGICK_VERSION="8:6.9.11.60+dfsg-1.6+deb12u*"
|
||||
ARG DEJAVU_VERSION="2.37-6"
|
||||
ARG NOTO_EMOJI_VERSION="2.042-0+deb12u*"
|
||||
# watch's YouTube fallback extracts audio with yt-dlp, which needs ffmpeg.
|
||||
# watch's YouTube fallback extracts audio with yt-dlp, which needs ffmpeg and
|
||||
# a JavaScript runtime for YouTube's signature/EJS work. Deno is yt-dlp's
|
||||
# default runtime.
|
||||
ARG FFMPEG_VERSION="7:5.1.*"
|
||||
ARG DENO_VERSION="2.9.8"
|
||||
# deb.debian.org is Fastly, which the home network reaches through a congested
|
||||
# path (NMSU -> CENIC -> Fastly: ~125 ms and ~60 KB/s, 2026-11-10) while other
|
||||
# mirrors give 3-7 MB/s. Leaseweb has no debian-security; OCF Berkeley does.
|
||||
@@ -53,6 +56,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv pip install --python /app/.venv/bin/python yt-dlp
|
||||
|
||||
# The image has no curl/unzip; Python fetches and unpacks the pinned binary.
|
||||
RUN python3 -c "import urllib.request; urllib.request.urlretrieve(\
|
||||
'https://github.com/denoland/deno/releases/download/v${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip', \
|
||||
'/tmp/deno.zip')" \
|
||||
&& python3 -c "import zipfile; zipfile.ZipFile('/tmp/deno.zip').extract('deno', '/usr/local/bin')" \
|
||||
&& chmod 755 /usr/local/bin/deno \
|
||||
&& rm /tmp/deno.zip \
|
||||
&& deno --version
|
||||
|
||||
# Import dogebot.logfilter at interpreter startup, before Red sets up logging
|
||||
RUN echo "import dogebot.logfilter" \
|
||||
> /app/.venv/lib/python3.11/site-packages/zz-dogebot-logfilter.pth
|
||||
|
||||
Reference in new issue
Block a user