From ad6ba613435e61a6a66a43557779aaaf04af56f0 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 06:39:14 -0400 Subject: [PATCH 1/9] Update Dockerfile --- Dockerfile | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 265a774..9b9ffad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,29 +96,17 @@ RUN \ flac \ opus-tools \ jq \ + git \ + wget \ + beets \ + python3 \ + python3-pip \ cron && \ apt-get purge --auto-remove -y && \ apt-get clean -# get python3 and git, and install python libraries +# get install SMA RUN \ - apt-get update && \ - apt-get install -y \ - git \ - wget \ - libchromaprint-tools \ - imagemagick \ - python3 \ - python3-acoustid \ - python3-pythonmagick \ - python3-pip && \ - # Install beets - pip3 install --no-cache-dir -U \ - beets \ - requests \ - Pillow \ - pylast \ - pyacoustid && \ # make directory mkdir -p ${SMA_PATH} && \ # download repo From e606d60f72f5591e853f71823eb5b2b4dfe386e5 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 06:47:38 -0400 Subject: [PATCH 2/9] Update Dockerfile --- Dockerfile | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b9ffad..e638f3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -88,7 +88,8 @@ ENV SUBTITLE_ATTACHMENT_CODEC="" COPY --from=ffmpeg /usr/local/ /usr/local/ RUN \ - # install dependancies + ############## install dependencies ############## + echo "**** install dependencies ****" && \ apt-get update -qq && \ apt-get install -qq -y \ mkvtoolnix \ @@ -103,10 +104,9 @@ RUN \ python3-pip \ cron && \ apt-get purge --auto-remove -y && \ - apt-get clean - -# get install SMA -RUN \ + apt-get clean && \ + ############## install SMA ############## + echo "**** setup SMA ****" && \ # make directory mkdir -p ${SMA_PATH} && \ # download repo @@ -119,10 +119,19 @@ RUN \ chmod g+w ${SMA_PATH}/config/sma.log && \ # install pip, venv, and set up a virtual self contained python environment python3 -m pip install --user --upgrade pip && \ - pip3 install -r ${SMA_PATH}/setup/requirements.txt - -RUN \ - # ffmpeg + pip3 install -r ${SMA_PATH}/setup/requirements.txt && \ + ############## setup sabnzbd-scripts ############## + echo "**** setup sabnzbd-scripts ****" && \ + # make directory + mkdir -p ${SABSCRIPTS_PATH} && \ + # download repo + git clone https://github.com/RandomNinjaAtk/sabnzbd-scripts.git ${SABSCRIPTS_PATH} && \ + ############## setup cron ############## + echo "**** setup cron ****" && \ + service cron start && \ + echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab" + ############## setup ffmpeg ############## + echo "**** setup ffmpeg ****" && \ chgrp users /usr/local/bin/ffmpeg && \ chgrp users /usr/local/bin/ffprobe && \ chmod g+x /usr/local/bin/ffmpeg && \ @@ -147,17 +156,6 @@ RUN \ rm -rf \ /var/lib/apt/lists/* \ /var/tmp/* - -RUN \ - # make directory - mkdir -p ${SABSCRIPTS_PATH} && \ - # download repo - git clone https://github.com/RandomNinjaAtk/sabnzbd-scripts.git ${SABSCRIPTS_PATH} - -RUN \ - # setup cron - service cron start && \ - echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab" WORKDIR / From 9d90aed480362efdcfdb9a4a4c319e90e563976e Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 06:52:38 -0400 Subject: [PATCH 3/9] Update Dockerfile --- Dockerfile | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index e638f3d..8958e10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -88,8 +88,7 @@ ENV SUBTITLE_ATTACHMENT_CODEC="" COPY --from=ffmpeg /usr/local/ /usr/local/ RUN \ - ############## install dependencies ############## - echo "**** install dependencies ****" && \ + echo "************ install dependencies ************" && \ apt-get update -qq && \ apt-get install -qq -y \ mkvtoolnix \ @@ -105,38 +104,34 @@ RUN \ cron && \ apt-get purge --auto-remove -y && \ apt-get clean && \ - ############## install SMA ############## - echo "**** setup SMA ****" && \ - # make directory + echo "************ setup SMA ************" && \ + echo "************ setup directory ************" && \ mkdir -p ${SMA_PATH} && \ - # download repo + echo ""************ download repo ************" && \ git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} && \ mkdir -p ${SMA_PATH}/config && \ - # create logging file + echo "************ create logging file ************" && \ mkdir -p ${SMA_PATH}/config && \ touch ${SMA_PATH}/config/sma.log && \ chgrp users ${SMA_PATH}/config/sma.log && \ chmod g+w ${SMA_PATH}/config/sma.log && \ - # install pip, venv, and set up a virtual self contained python environment + echo "************ install pip dependencies ************" && \ python3 -m pip install --user --upgrade pip && \ pip3 install -r ${SMA_PATH}/setup/requirements.txt && \ - ############## setup sabnzbd-scripts ############## - echo "**** setup sabnzbd-scripts ****" && \ - # make directory + echo "************ setup sabnzbd-scripts ************" && \ + echo "************ setup directory ************" && \ mkdir -p ${SABSCRIPTS_PATH} && \ - # download repo + echo "************ download repo ************" && \ git clone https://github.com/RandomNinjaAtk/sabnzbd-scripts.git ${SABSCRIPTS_PATH} && \ - ############## setup cron ############## - echo "**** setup cron ****" && \ + echo "************ setup cron ************" && \ service cron start && \ - echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab" - ############## setup ffmpeg ############## - echo "**** setup ffmpeg ****" && \ + echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab" && \ + echo "************ setup ffmpeg ************" && \ chgrp users /usr/local/bin/ffmpeg && \ chgrp users /usr/local/bin/ffprobe && \ chmod g+x /usr/local/bin/ffmpeg && \ chmod g+x /usr/local/bin/ffprobe && \ - echo "**** install runtime ****" && \ + echo "************ install runtime ************" && \ apt-get update && \ apt-get install -y \ i965-va-driver \ @@ -152,7 +147,7 @@ RUN \ libxml2 \ libva-drm2 \ libva2 && \ - echo "**** clean up ****" && \ + echo "************ clean up ************" && \ rm -rf \ /var/lib/apt/lists/* \ /var/tmp/* From 2557f72835cf73d906da03024ec2678dc64cb0a4 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 08:58:24 -0400 Subject: [PATCH 4/9] Update Dockerfile --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8958e10..d144ce8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -101,9 +101,16 @@ RUN \ beets \ python3 \ python3-pip \ + libchromaprint-tools \ cron && \ apt-get purge --auto-remove -y && \ apt-get clean && \ + echo "************ install Beets dependencies ************" && \ + pip3 install --no-cache-dir -U \ + requests \ + Pillow \ + pylast \ + pyacoustid && \ echo "************ setup SMA ************" && \ echo "************ setup directory ************" && \ mkdir -p ${SMA_PATH} && \ @@ -117,6 +124,7 @@ RUN \ chmod g+w ${SMA_PATH}/config/sma.log && \ echo "************ install pip dependencies ************" && \ python3 -m pip install --user --upgrade pip && \ + pip3 install -r ${SMA_PATH}/setup/requirements.txt && \ echo "************ setup sabnzbd-scripts ************" && \ echo "************ setup directory ************" && \ From bc8c00586af0c0b66603b2cc80ade2aee7dcee71 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 09:00:17 -0400 Subject: [PATCH 5/9] bugfix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d144ce8..632bb24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,7 +114,7 @@ RUN \ echo "************ setup SMA ************" && \ echo "************ setup directory ************" && \ mkdir -p ${SMA_PATH} && \ - echo ""************ download repo ************" && \ + echo "************ download repo ************" && \ git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git ${SMA_PATH} && \ mkdir -p ${SMA_PATH}/config && \ echo "************ create logging file ************" && \ From 3f74c252f06f4897cd7a3037e6087e4f3f64483e Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 09:28:15 -0400 Subject: [PATCH 6/9] Update Dockerfile --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 632bb24..a64ea01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -123,8 +123,7 @@ RUN \ chgrp users ${SMA_PATH}/config/sma.log && \ chmod g+w ${SMA_PATH}/config/sma.log && \ echo "************ install pip dependencies ************" && \ - python3 -m pip install --user --upgrade pip && \ - + python3 -m pip install --user --upgrade pip && \ pip3 install -r ${SMA_PATH}/setup/requirements.txt && \ echo "************ setup sabnzbd-scripts ************" && \ echo "************ setup directory ************" && \ From 04d40ff4d4e73cf4e3ed48f529510da45eda48ad Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 10:20:50 -0400 Subject: [PATCH 7/9] use ubuntu repo ffmpeg build --- Dockerfile | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index a64ea01..f67110d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ ARG ffmpeg_tag=snapshot-vaapi -FROM jrottenberg/ffmpeg:${ffmpeg_tag} as ffmpeg FROM linuxserver/sabnzbd LABEL maintainer="RandomNinjaAtk" @@ -102,6 +101,7 @@ RUN \ python3 \ python3-pip \ libchromaprint-tools \ + ffmpeg \ cron && \ apt-get purge --auto-remove -y && \ apt-get clean && \ @@ -132,32 +132,7 @@ RUN \ git clone https://github.com/RandomNinjaAtk/sabnzbd-scripts.git ${SABSCRIPTS_PATH} && \ echo "************ setup cron ************" && \ service cron start && \ - echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab" && \ - echo "************ setup ffmpeg ************" && \ - chgrp users /usr/local/bin/ffmpeg && \ - chgrp users /usr/local/bin/ffprobe && \ - chmod g+x /usr/local/bin/ffmpeg && \ - chmod g+x /usr/local/bin/ffprobe && \ - echo "************ install runtime ************" && \ - apt-get update && \ - apt-get install -y \ - i965-va-driver \ - libexpat1 \ - libgl1-mesa-dri \ - libglib2.0-0 \ - libgomp1 \ - libharfbuzz0b \ - libv4l-0 \ - libx11-6 \ - libxcb1 \ - libxext6 \ - libxml2 \ - libva-drm2 \ - libva2 && \ - echo "************ clean up ************" && \ - rm -rf \ - /var/lib/apt/lists/* \ - /var/tmp/* + echo "* * * * * root bash /etc/cont-init.d/33-script-setup.bash" >> "/etc/crontab" WORKDIR / From c1fcdf4dca35947db17960b708d588b67466a2f9 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 10:28:33 -0400 Subject: [PATCH 8/9] Update Dockerfile --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f67110d..15bf17d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,9 +83,6 @@ ENV SUBTITLE_FILENAME_DISPOSITIONS="forced" ENV SUBTITLE_IGNORE_EMBEDDED_SUBS="False" ENV SUBTITLE_ATTACHMENT_CODEC="" -# Add files from ffmpeg -COPY --from=ffmpeg /usr/local/ /usr/local/ - RUN \ echo "************ install dependencies ************" && \ apt-get update -qq && \ From c7379ff9c90feb727d4c96291ba898cf86cea221 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 1 Apr 2020 10:58:23 -0400 Subject: [PATCH 9/9] Simplifying dockerfile --- Dockerfile | 70 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 68 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15bf17d..224956d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,84 +4,18 @@ LABEL maintainer="RandomNinjaAtk" ENV SABSCRIPTS_PATH /usr/local/sabnzbd-scripts ENV SMA_PATH /usr/local/sma -ENV UPDATE_EXT TRUE +ENV UPDATE_EXT FALSE ENV UPDATE_SMA FALSE ENV VIDEO_LANG eng ENV VIDEO_SMA FALSE ENV AUDIO_VERIFY TRUE -ENV AUDIO_FORMAT FDK-AAC +ENV AUDIO_FORMAT FLAC ENV AUDIO_BITRATE 320 ENV AUDIO_REPLAYGAIN FALSE ENV AUDIO_DSFA TRUE ENV AUDIO_DSFAS 150M ENV AUDIO_BEETSTAGGING TRUE ENV AUDIO_REQUIREBEETSTAGGING false -# converter settings -ENV CONVERTER_THREADS="0" -ENV CONVERTER_OUTPUT_FORMAT="mp4" -ENV CONVERTER_OUTPUT_EXTENSION="mp4" -ENV CONVERTER_MINIMUM_SIZE="0" -ENV CONVERTER_SORT_STREAMS="True" -ENV CONVERTER_PROCESS_SAME_EXTENSIONS="False" -ENV CONVERTER_FORCE_CONVERT="False" -ENV CONVERTER_PREOPTS="" -ENV CONVERTER_POSTOPTS="" -# permissions -ENV PERMISSIONS_CHMOD="0666" -# metadata settings -ENV METADATA_RELOCATE_MOV="True" -ENV METADATA_TAG="False" -ENV METADATA_TAG_LANGUAGE="eng" -ENV METADATA_DOWNLOAD_ARTWORK="poster" -ENV METADATA_PRESERVE_SOURCE_DISPOSITION="True" -# video settings -ENV VIDEO_CODEC="h264, x264" -ENV VIDEO_MAX_BITRATE="0" -ENV VIDEO_CRF="-1" -ENV VIDEO_CRF_PROFILES="" -ENV VIDEO_MAX_WIDTH="0" -ENV VIDEO_PROFILE="" -ENV VIDEO_MAX_LEVEL="0.0" -ENV VIDEO_PIX_FMT="" -# audio settings -ENV AUDIO_CODEC="ac3" -ENV AUDIO_LANGUAGES="" -ENV AUDIO_DEFAULT_LANGUAGE="" -ENV AUDIO_FIRST_STREAM_OF_LANGUAGE="False" -ENV AUDIO_CHANNEL_BITRATE="128" -ENV AUDIO_MAX_BITRATE="0" -ENV AUDIO_MAX_CHANNELS="0" -ENV AUDIO_PREFER_MORE_CHANNELS="True" -ENV AUDIO_DEFAULT_MORE_CHANNELS="True" -ENV AUDIO_FILTER="" -ENV AUDIO_SAMPLE_RATES="" -ENV AUDIO_COPY_ORIGINAL="False" -ENV AUDIO_AAC_ADTSTOASC="False" -ENV AUDIO_IGNORE_TREHD="mp4, m4v" -# universal audio settings -ENV UAUDIO_CODEC="aac" -ENV UAUDIO_CHANNEL_BITRATE="128" -ENV UAUDIO_FIRST_STREAM_ONLY="False" -ENV UAUDIO_MOVE_AFTER="False" -ENV UAUDIO_FILTER="" -# subtitle settings -ENV SUBTITLE_CODEC="mov_text" -ENV SUBTITLE_CODEC_IMAGE_BASED="" -ENV SUBTITLE_LANGUAGES="" -ENV SUBTITLE_DEFAULT_LANGUAGE="" -ENV SUBTITLE_FIRST_STREAM_OF_LANGUAGE="False" -ENV SUBTITLE_ENCODING="" -ENV SUBTITLE_BURN_SUBTITLES="False" -ENV SUBTITLE_BURN_DISPOSITIONS="forced" -ENV SUBTITLE_DOWNLOAD_SUBS="False" -ENV SUBTITLE_DOWNLOAD_HEARING_IMPAIRED_SUBS="False" -ENV SUBTITLE_DOWNLOAD_PROVIDERS="" -ENV SUBTITLE_EMBED_SUBS="True" -ENV SUBTITLE_EMBED_IMAGE_SUBS="False" -ENV SUBTITLE_EMBED_ONLY_INTERNAL_SUBS="False" -ENV SUBTITLE_FILENAME_DISPOSITIONS="forced" -ENV SUBTITLE_IGNORE_EMBEDDED_SUBS="False" -ENV SUBTITLE_ATTACHMENT_CODEC="" RUN \ echo "************ install dependencies ************" && \