Browse Source

unify hardware acceleration in docker (#2045)

pull/2046/head
Jason Dove 4 days ago committed by GitHub
parent
commit
4b0faf4da1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 5
      ErsatzTV.Core/Health/Checks/IUnifiedDockerHealthCheck.cs
  3. 23
      ErsatzTV.Infrastructure/Health/Checks/UnifiedDockerHealthCheck.cs
  4. 4
      ErsatzTV.Infrastructure/Health/HealthCheckService.cs
  5. 1
      ErsatzTV/Startup.cs
  6. 1
      docker/Dockerfile
  7. 2
      docker/nvidia/Dockerfile
  8. 2
      docker/vaapi/Dockerfile

4
CHANGELOG.md

@ -45,6 +45,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -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 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
- 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
- Fix error message about synchronizing Plex collections from a Plex server that has zero collections

5
ErsatzTV.Core/Health/Checks/IUnifiedDockerHealthCheck.cs

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
namespace ErsatzTV.Core.Health.Checks;
public interface IUnifiedDockerHealthCheck : IHealthCheck
{
}

23
ErsatzTV.Infrastructure/Health/Checks/UnifiedDockerHealthCheck.cs

@ -0,0 +1,23 @@ @@ -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();
}
}

4
ErsatzTV.Infrastructure/Health/HealthCheckService.cs

@ -21,12 +21,14 @@ public class HealthCheckService : IHealthCheckService @@ -21,12 +21,14 @@ public class HealthCheckService : IHealthCheckService
IUnavailableHealthCheck unavailableHealthCheck,
IVaapiDriverHealthCheck vaapiDriverHealthCheck,
IErrorReportsHealthCheck errorReportsHealthCheck,
IUnifiedDockerHealthCheck unifiedDockerHealthCheck,
ILogger<HealthCheckService> logger)
{
_logger = logger;
_checks =
[
macOsConfigFolderHealthCheck,
unifiedDockerHealthCheck,
ffmpegVersionHealthCheck,
ffmpegReportsHealthCheck,
hardwareAccelerationHealthCheck,
@ -36,7 +38,7 @@ public class HealthCheckService : IHealthCheckService @@ -36,7 +38,7 @@ public class HealthCheckService : IHealthCheckService
fileNotFoundHealthCheck,
unavailableHealthCheck,
vaapiDriverHealthCheck,
errorReportsHealthCheck
errorReportsHealthCheck,
];
}

1
ErsatzTV/Startup.cs

@ -649,6 +649,7 @@ public class Startup @@ -649,6 +649,7 @@ public class Startup
services.AddScoped<IUnavailableHealthCheck, UnavailableHealthCheck>();
services.AddScoped<IVaapiDriverHealthCheck, VaapiDriverHealthCheck>();
services.AddScoped<IErrorReportsHealthCheck, ErrorReportsHealthCheck>();
services.AddScoped<IUnifiedDockerHealthCheck, UnifiedDockerHealthCheck>();
services.AddScoped<IHealthCheckService, HealthCheckService>();
services.AddScoped<IChannelRepository, ChannelRepository>();

1
docker/Dockerfile

@ -45,4 +45,5 @@ WORKDIR /app @@ -45,4 +45,5 @@ WORKDIR /app
COPY --from=build /app ./
ENV ETV_CONFIG_FOLDER=/config
ENV ETV_TRANSCODE_FOLDER=/transcode
ENV ETV_DISABLE_VULKAN=1
ENTRYPOINT ["./ErsatzTV"]

2
docker/nvidia/Dockerfile

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
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
# https://hub.docker.com/_/microsoft-dotnet

2
docker/vaapi/Dockerfile

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
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
# https://hub.docker.com/_/microsoft-dotnet

Loading…
Cancel
Save