unify hardware acceleration in docker (#2045)

This commit is contained in:
Jason Dove
2025-06-20 02:52:05 +00:00
committed by GitHub
parent 07cbf9936b
commit 4b0faf4da1
8 changed files with 39 additions and 3 deletions
+4
View File
@@ -45,6 +45,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Upgrade VAAPI docker image Ubuntu base from 22 to 24; bundled ffmpeg from 6.1 to 7.1.1 - Upgrade VAAPI docker image Ubuntu base from 22 to 24; bundled ffmpeg from 6.1 to 7.1.1
- Upgrade NVIDIA docker image Ubuntu base from 20 to 24; bundled ffmpeg from 6.1 to 7.1.1 - Upgrade NVIDIA docker image Ubuntu base from 20 to 24; bundled ffmpeg from 6.1 to 7.1.1
- Upgrade base, arm, arm64 docker images bundled ffmpeg from 6.1 to 7.1.1 - Upgrade base, arm, arm64 docker images bundled ffmpeg from 6.1 to 7.1.1
- Unify all hardware acceleration methods in base docker images (`latest` and `develop`)
- VAAPI, QSV and NVIDIA are now all supported in the base docker image
- Other docker image tags are deprecated and will receive no new updates after the next release
- A health check has been added to notify users (on `-vaapi` or `-nvidia` tags) of this change
### Fixed ### Fixed
- Fix error message about synchronizing Plex collections from a Plex server that has zero collections - Fix error message about synchronizing Plex collections from a Plex server that has zero collections
@@ -0,0 +1,5 @@
namespace ErsatzTV.Core.Health.Checks;
public interface IUnifiedDockerHealthCheck : IHealthCheck
{
}
@@ -0,0 +1,23 @@
using System.Reflection;
using ErsatzTV.Core.Health;
using ErsatzTV.Core.Health.Checks;
namespace ErsatzTV.Infrastructure.Health.Checks;
public class UnifiedDockerHealthCheck : BaseHealthCheck, IUnifiedDockerHealthCheck
{
private static readonly string InfoVersion = Assembly.GetEntryAssembly()!.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? "unknown";
public override string Title => "Unified Docker";
public Task<HealthCheckResult> Check(CancellationToken cancellationToken)
{
if (InfoVersion.Contains("docker-vaapi") || InfoVersion.Contains("docker-nvidia"))
{
return WarningResult("VAAPI and NVIDIA docker tag suffixes are deprecated; please remove `-vaapi` or `-nvidia` and pull the default image.")
.AsTask();
}
return NotApplicableResult().AsTask();
}
}
@@ -21,12 +21,14 @@ public class HealthCheckService : IHealthCheckService
IUnavailableHealthCheck unavailableHealthCheck, IUnavailableHealthCheck unavailableHealthCheck,
IVaapiDriverHealthCheck vaapiDriverHealthCheck, IVaapiDriverHealthCheck vaapiDriverHealthCheck,
IErrorReportsHealthCheck errorReportsHealthCheck, IErrorReportsHealthCheck errorReportsHealthCheck,
IUnifiedDockerHealthCheck unifiedDockerHealthCheck,
ILogger<HealthCheckService> logger) ILogger<HealthCheckService> logger)
{ {
_logger = logger; _logger = logger;
_checks = _checks =
[ [
macOsConfigFolderHealthCheck, macOsConfigFolderHealthCheck,
unifiedDockerHealthCheck,
ffmpegVersionHealthCheck, ffmpegVersionHealthCheck,
ffmpegReportsHealthCheck, ffmpegReportsHealthCheck,
hardwareAccelerationHealthCheck, hardwareAccelerationHealthCheck,
@@ -36,7 +38,7 @@ public class HealthCheckService : IHealthCheckService
fileNotFoundHealthCheck, fileNotFoundHealthCheck,
unavailableHealthCheck, unavailableHealthCheck,
vaapiDriverHealthCheck, vaapiDriverHealthCheck,
errorReportsHealthCheck errorReportsHealthCheck,
]; ];
} }
+1
View File
@@ -649,6 +649,7 @@ public class Startup
services.AddScoped<IUnavailableHealthCheck, UnavailableHealthCheck>(); services.AddScoped<IUnavailableHealthCheck, UnavailableHealthCheck>();
services.AddScoped<IVaapiDriverHealthCheck, VaapiDriverHealthCheck>(); services.AddScoped<IVaapiDriverHealthCheck, VaapiDriverHealthCheck>();
services.AddScoped<IErrorReportsHealthCheck, ErrorReportsHealthCheck>(); services.AddScoped<IErrorReportsHealthCheck, ErrorReportsHealthCheck>();
services.AddScoped<IUnifiedDockerHealthCheck, UnifiedDockerHealthCheck>();
services.AddScoped<IHealthCheckService, HealthCheckService>(); services.AddScoped<IHealthCheckService, HealthCheckService>();
services.AddScoped<IChannelRepository, ChannelRepository>(); services.AddScoped<IChannelRepository, ChannelRepository>();
+1
View File
@@ -45,4 +45,5 @@ WORKDIR /app
COPY --from=build /app ./ COPY --from=build /app ./
ENV ETV_CONFIG_FOLDER=/config ENV ETV_CONFIG_FOLDER=/config
ENV ETV_TRANSCODE_FOLDER=/transcode ENV ETV_TRANSCODE_FOLDER=/transcode
ENV ETV_DISABLE_VULKAN=1
ENTRYPOINT ["./ErsatzTV"] ENTRYPOINT ["./ErsatzTV"]
+1 -1
View File
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-amd64 AS dotnet-runtime FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-amd64 AS dotnet-runtime
FROM jasongdove/ersatztv-ffmpeg:7.1.1-nvidia AS runtime-base FROM jasongdove/ersatztv-ffmpeg:7.1.1 AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
# https://hub.docker.com/_/microsoft-dotnet # https://hub.docker.com/_/microsoft-dotnet
+1 -1
View File
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-amd64 AS dotnet-runtime FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-amd64 AS dotnet-runtime
FROM jasongdove/ersatztv-ffmpeg:7.1.1-vaapi AS runtime-base FROM jasongdove/ersatztv-ffmpeg:7.1.1 AS runtime-base
COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet COPY --from=dotnet-runtime /usr/share/dotnet /usr/share/dotnet
# https://hub.docker.com/_/microsoft-dotnet # https://hub.docker.com/_/microsoft-dotnet