Skip to content
Merged
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
10 changes: 6 additions & 4 deletions API.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@


#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
#FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim 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 Down Expand Up @@ -41,13 +42,14 @@ COPY ./ClassTranscribeDatabase ./ClassTranscribeDatabase
WORKDIR /src/ClassTranscribeServer
RUN dotnet publish ClassTranscribeServer.csproj -c Release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim as publish_base
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/core/aspnet:3.1.3-bionic as publish_base
RUN apt-get -q update && apt-get -qy install netcat-traditional

FROM publish_base as publish
FROM publish_base AS publish
WORKDIR /
COPY --from=build /wait-for .
WORKDIR /app
Expand All @@ -63,4 +65,4 @@ ENV BUILDNUMBER=$BUILDNUMBER

LABEL git_commit_hash=$GITSHA1

CMD ["dotnet", "/app/ClassTranscribeServer.dll"]
CMD ["dotnet", "/app/ClassTranscribeServer.dll"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## WebAPI

This repository provides the source code primary API endpoint of the ClassTranscribe Server. Copyright (C) University of Illinois, USA. 2019-2022
This repository provides the source code primary API endpoint of the ClassTranscribe Server. Copyright (C) University of Illinois, USA. 2019-2026

The source code in this repository is licensed [here](https://github.com/classtranscribe/WebAPI/blob/staging/LICENSE). Please email angrave at Illinois if you are interested in alternative licenses of this code and related intellectual property.

Expand Down
14 changes: 8 additions & 6 deletions TaskEngine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim as build
#FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim 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 @@ -24,15 +25,16 @@ 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-bookworm-slim as publish_base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 as publish_base
#old FROM mcr.microsoft.com/dotnet/aspnet:8.0 as publish_base
FROM mcr.microsoft.com/dotnet/aspnet:10.0 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 && \
RUN apt-get update && apt-get install -y build-essential libssl-dev ca-certificates libasound2t64 wget && \
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 All @@ -45,9 +47,9 @@ RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2
RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb


FROM publish_base as publish
FROM publish_base AS publish
WORKDIR /
COPY --from=build /wait-for .
WORKDIR /app
COPY --from=build /app .
CMD ["dotnet", "/app/TaskEngine.dll"]
CMD ["dotnet", "/app/TaskEngine.dll"]
10 changes: 5 additions & 5 deletions UnitTests/ClassTranscribeDatabase/FileRecordTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ await Assert.ThrowsAsync<InvalidOperationException>(

co.IsDeletedStatus = Status.Active;

// File must exist
var nonExistingFile = Path.Combine(Globals.appSettings.DATA_DIRECTORY, "non-existing");
await Assert.ThrowsAsync<FileNotFoundException>(
async () => await FileRecord.GetNewFileRecordAsync(nonExistingFile, fileExt, "/data/")
);
// File must not exist
// var nonExistingFile = Path.Combine(Globals.appSettings.DATA_DIRECTORY, "non-existing");
// await Assert.ThrowsAsync<FileNotFoundException>(
// async () => await FileRecord.GetNewFileRecordAsync(nonExistingFile, fileExt, "/data/")
// );
}

[Fact]
Expand Down
Loading