Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x' # SDK Version to use; x will use the latest version of the channel
dotnet-version: '10.0.x' # SDK Version to use; x will use the latest version of the channel

- uses: actions/cache@v4
with:
Expand Down
17 changes: 9 additions & 8 deletions API.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#


#FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-amd64 as build
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
#notyet FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build
# See https://mcr.microsoft.com/en-us/product/dotnet/sdk/tags

# Running the AMD64 version is of the SDK is broken
Expand All @@ -26,6 +24,7 @@ WORKDIR /
RUN git clone https://github.com/eficode/wait-for.git

WORKDIR /src
COPY ./Directory.Build.props ./
COPY ./ClassTranscribeDatabase/ClassTranscribeDatabase.csproj ./ClassTranscribeDatabase/ClassTranscribeDatabase.csproj
# Did not help ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false
# Add --verbosity normal|diagnostic
Expand All @@ -42,12 +41,14 @@ COPY ./ClassTranscribeDatabase ./ClassTranscribeDatabase
WORKDIR /src/ClassTranscribeServer
RUN dotnet publish ClassTranscribeServer.csproj -c Release -o /app --no-restore

#Not yet FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS publish_base
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim as publish_base
# FROM mcr.microsoft.com/dotnet/aspnet:7.0.14-bookworm-slim as publish_base
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS publish_base

# FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.3-bionic as publish_base
RUN apt-get -q update && apt-get -qy install netcat-traditional
# Install libasound2t64 and create a symlink to map it to the legacy filename expected by the Speech SDK.
# This ensures native binaries searching for libasound.so.2 can resolve the dependency on Ubuntu 24.04.
RUN apt-get -q update && \
apt-get install -y libasound2t64 netcat-traditional && \
ln -s /usr/lib/x86_64-linux-gnu/libasound.so.2 /usr/lib/libasound.so.2 && \
apt-get -q update

FROM publish_base AS publish
WORKDIR /
Expand Down
26 changes: 14 additions & 12 deletions ClassTranscribeDatabase/ClassTranscribeDatabase.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down Expand Up @@ -29,29 +29,31 @@

<ItemGroup>
<PackageReference Include="Box.V2.Core" Version="5.6.1" />
<PackageReference Include="Google.Protobuf" Version="3.25.1" />
<PackageReference Include="Google.Protobuf" Version="3.29.3" />
<PackageReference Include="Grpc.Core" Version="2.46.6" />
<PackageReference Include="Grpc.Tools" Version="2.60.0">
<PackageReference Include="Grpc.Tools" Version="2.69.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Innofactor.EfCoreJsonValueConverter" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.34.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.0" />
<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.42.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.1" />
<PackageReference Include="RabbitMQ.Client" Version="6.8.1" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.16.0" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.16.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion ClassTranscribeDatabase/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0"
"version": "10.0"
}
}
39 changes: 19 additions & 20 deletions ClassTranscribeServer/ClassTranscribeServer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>232163e5-4e61-44e2-a21b-f2c37da7a892</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
Expand Down Expand Up @@ -42,34 +42,33 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.103">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.11" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.22" />
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.6.11" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.1" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.12" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
<PackageReference Include="RestSharp" Version="112.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="7.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.3.1" />
<PackageReference Include="NEST" Version="7.17.5" />
<PackageReference Include="Elasticsearch.Net" Version="7.17.5" />
<PackageReference Include="SubtitlesParser" Version="1.5.1" />
Expand Down
33 changes: 19 additions & 14 deletions ClassTranscribeServer/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ClassTranscribeDatabase;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;

Expand All @@ -11,25 +11,30 @@ public static class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
CreateHostBuilder(args).Build().Run();
}

public static IWebHostBuilder CreateWebHostBuilder(string[] args)
public static IHostBuilder CreateHostBuilder(string[] args)
{
var v = WebHost.CreateDefaultBuilder(args)
.ConfigureServices(c => c.AddOptions().Configure<AppSettings>(CTDbContext.GetConfigurations()));

// TTODO better code would use AppSettings
return Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.ConfigureServices((hostContext, services) =>
{
services.AddOptions().Configure<AppSettings>(CTDbContext.GetConfigurations());

string viewSQL = Environment.GetEnvironmentVariable("LogEntityFrameworkSQL") ?? "false";
string viewSQL = Environment.GetEnvironmentVariable("LogEntityFrameworkSQL") ?? "false";

if( viewSQL.Trim().ToUpperInvariant() != "TRUE") {

v.ConfigureLogging((context, logging) => {
logging.AddFilter("Microsoft.EntityFrameworkCore.Database.Command", LogLevel.Warning);
if (viewSQL.Trim().ToUpperInvariant() != "TRUE")
{
services.AddLogging(logging =>
{
logging.AddFilter("Microsoft.EntityFrameworkCore.Database.Command", LogLevel.Warning);
});
}
});
}
return v.UseStartup<Startup>();
}
}
}
2 changes: 1 addition & 1 deletion ClassTranscribeServer/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0"
"version": "10.0"
}
}
10 changes: 5 additions & 5 deletions DevExperiments/DevExperiments.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,11 +11,11 @@

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<AllowMissingPrunePackageData>true</AllowMissingPrunePackageData>
</PropertyGroup>
</Project>
12 changes: 7 additions & 5 deletions TaskEngine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim as build
#not yet FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build
# See https://mcr.microsoft.com/en-us/product/dotnet/sdk/tags
#See more comments in API.Dockerfile
# RUN ls
Expand All @@ -9,6 +8,7 @@ WORKDIR /
RUN git clone https://github.com/eficode/wait-for.git

WORKDIR /src
COPY ./Directory.Build.props ./
COPY ./ClassTranscribeDatabase/ClassTranscribeDatabase.csproj ./ClassTranscribeDatabase/ClassTranscribeDatabase.csproj
# --verbosity normal|diagnostic

Expand All @@ -25,16 +25,18 @@ COPY ./TaskEngine ./TaskEngine
WORKDIR /src/TaskEngine
RUN dotnet publish TaskEngine.csproj -c Release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:8.0 as publish_base
#notyet FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS publish_base
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS publish_base
# https://hub.docker.com/_/microsoft-dotnet-aspnet/

# force AMD64 build here: the ssl1.1.1 workaround below assumes amd64
# Install prerequisites for Azure Speech Services: build-essential libssl-dev ca-certificates libasound2 wget
# See https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform
# 10.0 libasound2 replaced with libasound2t64

RUN apt-get update && apt-get install -y build-essential libssl-dev ca-certificates libasound2 wget && \
# Create a symlink to map the new t64 library to the legacy filename expected by the Speech SDK.
# This ensures native binaries searching for libasound.so.2 can resolve the dependency on Ubuntu 24.04.
RUN apt-get update && apt-get install -y build-essential libssl-dev ca-certificates libasound2t64 wget && \
ln -s /usr/lib/x86_64-linux-gnu/libasound.so.2 /usr/lib/libasound.so.2 && \
apt-get install -y netcat-traditional && apt-get -q update

# Microsoft 8.0 issue: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/2204
Expand Down
12 changes: 6 additions & 6 deletions TaskEngine/TaskEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -16,17 +16,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.103">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.0" />
<PackageReference Include="NEST" Version="7.17.5" />
<PackageReference Include="Elasticsearch.Net" Version="7.17.5" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="RestSharp" Version="112.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TaskEngine/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0"
"version": "10.0"
}
}
36 changes: 19 additions & 17 deletions TestAzureCognitiveServices/TestAzure.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-1-bookworm-slim as build1
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble as build1

WORKDIR /src
COPY ./Directory.Build.props ./
COPY ./ClassTranscribeDatabase/ClassTranscribeDatabase.csproj ./ClassTranscribeDatabase/
WORKDIR /src/TestAzureCognitiveServices

COPY . .
COPY ./TestAzureCognitiveServices/TestAzureCognitiveServices.csproj ./
RUN dotnet restore ./TestAzureCognitiveServices.csproj
RUN dotnet publish ./TestAzureCognitiveServices.csproj -c Release -o /app --no-restore

#FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim as publish_base1
# FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim-arm64v8 as publish_base1
FROM mcr.microsoft.com/dotnet/aspnet:8.0 as publish_base1

#COPY ./Program.cs /
WORKDIR /src
COPY ./ClassTranscribeDatabase ./ClassTranscribeDatabase
COPY ./TestAzureCognitiveServices ./TestAzureCognitiveServices
WORKDIR /src/TestAzureCognitiveServices
RUN dotnet publish ./TestAzureCognitiveServices.csproj -c Release -o /app --no-restore

# Grrr AzureServices does not work on dotnet8 on Debian 12 because it wont link to libssl3 - fix below is needed for short-term
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble as publish_base1

# Install prerequisites for Azure Speech Services
# See https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform
RUN apt-get update
RUN apt-get -y install build-essential libssl-dev libasound2 wget
# Install libasound2t64 and create a symlink to map it to the legacy filename expected by the Speech SDK.
# This ensures native binaries searching for libasound.so.2 can resolve the dependency on Ubuntu 24.04.
RUN apt-get update && \
apt-get install -y libasound2t64 build-essential libssl-dev wget && \
ln -s /usr/lib/x86_64-linux-gnu/libasound.so.2 /usr/lib/libasound.so.2 && \
apt-get -q update

# Microsoft 8.0 issue: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/2204
# This will install OpenSSL 1.1.1 because it is needed by the Speech SDK.
#RUN ARCH=$(dpkg --print-architecture)
COPY ./install-libssl1.sh /
COPY ./TestAzureCognitiveServices/install-libssl1.sh /
RUN /install-libssl1.sh

FROM publish_base1 as publish1
WORKDIR /app
COPY --from=build1 /app .
COPY shortwav.wav /
COPY ./TestAzureCognitiveServices/shortwav.wav /
CMD ["dotnet", "/app/TestAzureCognitiveServices.dll"]

# Example
Expand Down
Loading