split plugin install, runtime whitelisting
This commit is contained in:
parent
ee4b91f2e1
commit
8f45e3cb7e
|
|
@ -25,7 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
|
||||||
# install requirements
|
# install requirements
|
||||||
COPY ./backend/requirements.txt /requirements.txt
|
COPY ./backend/requirements.txt /requirements.txt
|
||||||
RUN pip install --user -r requirements.txt
|
COPY ./backend/requirements.plugins.txt /requirements.plugins.txt
|
||||||
|
RUN pip install --user -r /requirements.txt \
|
||||||
|
&& python -m pip install --target /opt/yt_plugins/bgutil -r /requirements.plugins.txt
|
||||||
|
|
||||||
# build ffmpeg
|
# build ffmpeg
|
||||||
FROM python:3.13.11-slim-trixie AS ffmpeg-builder
|
FROM python:3.13.11-slim-trixie AS ffmpeg-builder
|
||||||
|
|
@ -46,6 +48,7 @@ COPY --from=denoland/deno:bin /deno /usr/local/bin/deno
|
||||||
|
|
||||||
# copy build requirements
|
# copy build requirements
|
||||||
COPY --from=builder /root/.local /root/.local
|
COPY --from=builder /root/.local /root/.local
|
||||||
|
COPY --from=builder /opt/yt_plugins /opt/yt_plugins
|
||||||
ENV PATH=/root/.local/bin:$PATH
|
ENV PATH=/root/.local/bin:$PATH
|
||||||
|
|
||||||
# copy ffmpeg
|
# copy ffmpeg
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ class YtWrap:
|
||||||
"cachedir": path.abspath(
|
"cachedir": path.abspath(
|
||||||
path.join(EnvironmentSettings.CACHE_DIR, "ytdlp")
|
path.join(EnvironmentSettings.CACHE_DIR, "ytdlp")
|
||||||
),
|
),
|
||||||
|
"plugin_dirs": [],
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, obs_request, config=False):
|
def __init__(self, obs_request, config=False):
|
||||||
|
|
@ -72,17 +73,7 @@ class YtWrap:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
return
|
self.obs["plugin_dirs"].append("/opt/yt_plugins/bgutil")
|
||||||
|
|
||||||
# https://github.com/Brainicism/bgutil-ytdlp-pot-provider/pull/185
|
|
||||||
deep_merge(
|
|
||||||
self.obs,
|
|
||||||
{
|
|
||||||
"extractor_args": {
|
|
||||||
"youtubepot-bgutilhttp": {"disable": ["True"]}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
def download(self, url):
|
def download(self, url):
|
||||||
"""make download request"""
|
"""make download request"""
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# install plugins in separate folder for runtime whitelisting
|
||||||
|
bgutil-ytdlp-pot-provider==1.3.1
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
apprise==1.9.7
|
apprise==1.9.8
|
||||||
bgutil-ytdlp-pot-provider @ git+https://github.com/bbilly1/bgutil-ytdlp-pot-provider@f9e694f0b040ec3074301e8ffccad0f9cdb68ed1#subdirectory=plugin
|
|
||||||
celery==5.6.2
|
celery==5.6.2
|
||||||
deepdiff==8.6.1
|
deepdiff==8.6.1
|
||||||
django-auth-ldap==5.3.0
|
django-auth-ldap==5.3.0
|
||||||
|
|
@ -9,8 +8,8 @@ Django==6.0.3
|
||||||
djangorestframework==3.16.1
|
djangorestframework==3.16.1
|
||||||
drf-spectacular==0.28.0 # rc:ignore
|
drf-spectacular==0.28.0 # rc:ignore
|
||||||
Pillow==12.1.1
|
Pillow==12.1.1
|
||||||
redis==7.2.1
|
redis==7.3.0
|
||||||
requests==2.32.5
|
requests==2.32.5
|
||||||
ryd-client==0.0.6
|
ryd-client==0.0.6
|
||||||
uvicorn==0.41.0
|
uvicorn==0.41.0
|
||||||
yt-dlp[default]==2026.3.3
|
yt-dlp[default]==2026.3.13
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
-r backend/requirements.txt
|
-r backend/requirements.txt
|
||||||
ipython==9.10.0
|
-r backend/requirements.plugins.txt
|
||||||
|
ipython==9.11.0
|
||||||
pre-commit==4.5.1
|
pre-commit==4.5.1
|
||||||
pylint-django==2.7.0
|
pylint-django==2.7.0
|
||||||
pylint==4.0.5
|
pylint==4.0.5
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue