Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Opencast 15.0 #216

Merged
merged 9 commits into from
Dec 25, 2023
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
12 changes: 6 additions & 6 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ jobs:
opencast_version: 'master'
push_major: 'false'
- day_of_week: '1'
opencast_version: '14.7'
opencast_version: '15.0'
push_major: 'true'
- day_of_week: '2'
opencast_version: '14.6'
opencast_version: '15.0'
push_major: 'false'
- day_of_week: '3'
opencast_version: '14.5'
opencast_version: '15.0'
push_major: 'false'

# legacy
- day_of_week: '4'
opencast_version: '13.13'
opencast_version: '14.7'
push_major: 'true'
- day_of_week: '5'
opencast_version: '13.12'
opencast_version: '14.6'
push_major: 'false'
- day_of_week: '6'
opencast_version: '13.11'
opencast_version: '14.5'
push_major: 'false'

steps:
Expand Down
51 changes: 25 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,29 @@ RUN apk add --no-cache \
&& mv ff* /usr/local/bin


FROM docker.io/eclipse-temurin:11-jdk AS build-su-exec
FROM docker.io/eclipse-temurin:17-jdk AS build-whisper-cpp
ARG WHISPER_CPP_VERSION="master"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
g++ \
gcc \
git \
libc-dev \
make
RUN git clone https://github.com/ncopa/su-exec.git /tmp/su-exec \
&& cd /tmp/su-exec \
&& make \
&& cp su-exec /usr/local/sbin
RUN mkdir -p /tmp/whisper.cpp
WORKDIR /tmp/whisper.cpp
RUN git clone https://github.com/ggerganov/whisper.cpp.git . \
&& git checkout "$WHISPER_CPP_VERSION"
RUN make -j \
&& sed -i 's#models_path=.*$#models_path=/usr/share/whisper.cpp/models/#' models/download-ggml-model.sh
RUN mkdir -p out \
&& mv main out/whisper.cpp \
&& mv quantize out/whisper.cpp-quantize \
&& mv server out/whisper.cpp-server \
&& mv models/download-ggml-model.sh out/whisper.cpp-model-download


FROM --platform=${BUILDPLATFORM} docker.io/maven:3-eclipse-temurin-11 AS build-opencast
FROM --platform=${BUILDPLATFORM} docker.io/maven:3-eclipse-temurin-17 AS build-opencast

ARG OPENCAST_REPO="https://github.com/opencast/opencast.git"
ARG OPENCAST_VERSION="develop"
Expand Down Expand Up @@ -81,8 +90,8 @@ ARG OPENCAST_DISTRIBUTION
RUN tar -xzf build/opencast-dist-${OPENCAST_DISTRIBUTION}-*.tar.gz --strip 1 -C "${OPENCAST_HOME}"


FROM docker.io/eclipse-temurin:11-jdk
LABEL org.opencontainers.image.base.name="docker.io/eclipse-temurin:11-jdk"
FROM docker.io/eclipse-temurin:17-jdk
LABEL org.opencontainers.image.base.name="docker.io/eclipse-temurin:17-jdk"

ENV OPENCAST_HOME="/opencast" \
OPENCAST_DATA="/data" \
Expand All @@ -91,16 +100,17 @@ ENV OPENCAST_HOME="/opencast" \
OPENCAST_GROUP="opencast" \
OPENCAST_UHOME="/home/opencast" \
OPENCAST_UID="800" \
OPENCAST_GID="800"
OPENCAST_GID="800" \
WHISPER_CPP_MODELS="/usr/share/whisper.cpp/models"
ENV OPENCAST_CONFIG="${OPENCAST_HOME}/etc" \
OPENCAST_SCRIPTS="${OPENCAST_HOME}/docker/scripts" \
OPENCAST_STAGE_BASE_HOME="${OPENCAST_HOME}/docker/stage/base" \
OPENCAST_STAGE_OUT_HOME="${OPENCAST_HOME}/docker/stage/out"

RUN groupadd --system -g "${OPENCAST_GID}" "${OPENCAST_GROUP}" \
&& useradd --system -M -N -g "${OPENCAST_GROUP}" -d "${OPENCAST_UHOME}" -u "${OPENCAST_UID}" "${OPENCAST_USER}" \
&& mkdir -p "${OPENCAST_DATA}" "${OPENCAST_UHOME}" \
&& chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_DATA}" "${OPENCAST_UHOME}"
&& mkdir -p "${OPENCAST_DATA}" "${OPENCAST_UHOME}" "${WHISPER_CPP_MODELS}" \
&& chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_DATA}" "${OPENCAST_UHOME}" "${WHISPER_CPP_MODELS}"

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand All @@ -111,31 +121,20 @@ RUN apt-get update \
fonts-freefont-ttf \
fonts-liberation \
fonts-linuxlibertine \
hunspell \
hunspell-en-au \
hunspell-en-ca \
hunspell-en-gb \
hunspell-en-us \
hunspell-en-za \
gosu \
inotify-tools \
jq \
netcat-openbsd \
openssl \
python3 \
python3-pip \
rsync \
sox \
synfig \
tesseract-ocr \
tesseract-ocr-eng \
tzdata \
&& pip install \
vosk-cli \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build-su-exec /usr/local/sbin/su-exec /usr/local/sbin/
COPY --from=build-ffmpeg /usr/local/bin/ff* /usr/local/bin/
COPY --from=build-opencast "${OPENCAST_HOME}" "${OPENCAST_HOME}"
COPY --from=build-ffmpeg /usr/local/bin/ff* /usr/local/bin/
COPY --from=build-whisper-cpp /tmp/whisper.cpp/out/* /usr/local/bin/
COPY --from=build-opencast "${OPENCAST_HOME}" "${OPENCAST_HOME}"
COPY rootfs /

ARG OPENCAST_REPO="https://github.com/opencast/opencast.git"
Expand Down
47 changes: 23 additions & 24 deletions Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,30 @@ RUN apk add --no-cache \
&& mv ff* /usr/local/bin


FROM docker.io/maven:3-eclipse-temurin-11 AS build-su-exec
FROM docker.io/eclipse-temurin:17-jdk AS build-whisper-cpp
ARG WHISPER_CPP_VERSION="master"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
g++ \
gcc \
git \
libc-dev \
make
RUN git clone https://github.com/ncopa/su-exec.git /tmp/su-exec \
&& cd /tmp/su-exec \
&& make \
&& cp su-exec /usr/local/sbin
RUN mkdir -p /tmp/whisper.cpp
WORKDIR /tmp/whisper.cpp
RUN git clone https://github.com/ggerganov/whisper.cpp.git . \
&& git checkout "$WHISPER_CPP_VERSION"
RUN make -j \
&& sed -i 's#models_path=.*$#models_path=/usr/share/whisper.cpp/models/#' models/download-ggml-model.sh
RUN mkdir -p out \
&& mv main out/whisper.cpp \
&& mv quantize out/whisper.cpp-quantize \
&& mv server out/whisper.cpp-server \
&& mv models/download-ggml-model.sh out/whisper.cpp-model-download


FROM docker.io/maven:3-eclipse-temurin-11
LABEL org.opencontainers.image.base.name="docker.io/maven:3-eclipse-temurin-11"
FROM docker.io/maven:3-eclipse-temurin-17
LABEL org.opencontainers.image.base.name="docker.io/maven:3-eclipse-temurin-17"

ARG OPENCAST_REPO="https://github.com/opencast/opencast.git"
ARG OPENCAST_VERSION="develop"
Expand Down Expand Up @@ -74,7 +83,8 @@ ENV OPENCAST_REPO="${OPENCAST_REPO}" \
OPENCAST_UHOME="/home/opencast" \
OPENCAST_UID="800" \
OPENCAST_GID="800" \
OPENCAST_BUILD_ASSETS="/docker"
OPENCAST_BUILD_ASSETS="/docker" \
WHISPER_CPP_MODELS="/usr/share/whisper.cpp/models"
ENV OPENCAST_CONFIG="${OPENCAST_HOME}/etc" \
OPENCAST_SCRIPTS="${OPENCAST_HOME}/docker/scripts" \
OPENCAST_STAGE_BASE_HOME="${OPENCAST_HOME}/docker/stage/base" \
Expand Down Expand Up @@ -111,40 +121,29 @@ RUN apt-get update \
fonts-freefont-ttf \
fonts-liberation \
fonts-linuxlibertine \
hunspell \
hunspell-en-au \
hunspell-en-ca \
hunspell-en-gb \
hunspell-en-us \
hunspell-en-za \
gosu \
inotify-tools \
jq \
netcat-openbsd \
openssl \
python3 \
python3-pip \
rsync \
sox \
synfig \
tesseract-ocr \
tesseract-ocr-eng \
tzdata \
&& pip install \
vosk-cli \
\
&& sudo ln -s /usr/local/openjdk*/bin/* /usr/local/bin/ \
\
&& groupadd --system -g "${OPENCAST_GID}" "${OPENCAST_GROUP}" \
&& useradd --system -M -N -g "${OPENCAST_GROUP}" -d "${OPENCAST_UHOME}" -u "${OPENCAST_UID}" "${OPENCAST_USER}" \
&& mkdir -p "${OPENCAST_SRC}" "${OPENCAST_HOME}" "${OPENCAST_UHOME}" "${OPENCAST_DATA}" "${OPENCAST_BUILD_ASSETS}" \
&& chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_HOME}" "${OPENCAST_UHOME}" "${OPENCAST_DATA}" \
&& mkdir -p "${OPENCAST_SRC}" "${OPENCAST_HOME}" "${OPENCAST_UHOME}" "${OPENCAST_DATA}" "${OPENCAST_BUILD_ASSETS}" "${WHISPER_CPP_MODELS}" \
&& chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_HOME}" "${OPENCAST_UHOME}" "${OPENCAST_DATA}" "${WHISPER_CPP_MODELS}" \
&& echo "opencast-builder ALL = NOPASSWD: ALL" > /etc/sudoers.d/opencast-builder \
\
&& cd / \
&& rm -rf /tmp/* /var/lib/apt/lists/*

COPY --from=build-su-exec /usr/local/sbin/su-exec /usr/local/sbin/
COPY --from=build-ffmpeg /usr/local/bin/ff* /usr/local/bin/
COPY --from=build-ffmpeg /usr/local/bin/ff* /usr/local/bin/
COPY --from=build-whisper-cpp /tmp/whisper.cpp/out/* /usr/local/bin/
COPY rootfs "${OPENCAST_BUILD_ASSETS}/"
COPY rootfs-build /

Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

# user configurable variables

VERSION ?= $(shell cat VERSION)
VERSION_MAJOR ?= $(shell cat VERSION_MAJOR)
OPENCAST_REPO ?= https://github.com/opencast/opencast.git
OPENCAST_VERSION ?= $(shell cat VERSION_OPENCAST)
FFMPEG_VERSION ?= $(shell cat VERSION_FFMPEG)
VERSION ?= $(shell cat VERSION)
VERSION_MAJOR ?= $(shell cat VERSION_MAJOR)
OPENCAST_REPO ?= https://github.com/opencast/opencast.git
OPENCAST_VERSION ?= $(shell cat VERSION_OPENCAST)
FFMPEG_VERSION ?= $(shell cat VERSION_FFMPEG)
WHISPER_CPP_VERSION ?= $(shell cat VERSION_WHISPER_CPP)

IMAGE_REGISTRY ?= quay.io/opencast
IMAGE_TAGS ?= latest $(VERSION) $(VERSION_MAJOR)
Expand Down Expand Up @@ -58,6 +59,7 @@ build-%:
--build-arg OPENCAST_VERSION="$(OPENCAST_VERSION)" \
--build-arg OPENCAST_DISTRIBUTION="$*" \
--build-arg FFMPEG_VERSION="$(FFMPEG_VERSION)" \
--build-arg WHISPER_CPP_VERSION="$(WHISPER_CPP_VERSION)" \
--build-arg BUILD_DATE="$(BUILD_DATE)" \
--build-arg GIT_COMMIT="$(GIT_COMMIT)" \
--build-arg VERSION="$(VERSION)" \
Expand All @@ -74,6 +76,7 @@ build-build:
--build-arg OPENCAST_REPO="$(OPENCAST_REPO)" \
--build-arg OPENCAST_VERSION="$(OPENCAST_VERSION)" \
--build-arg FFMPEG_VERSION="$(FFMPEG_VERSION)" \
--build-arg WHISPER_CPP_VERSION="$(WHISPER_CPP_VERSION)" \
--build-arg BUILD_DATE="$(BUILD_DATE)" \
--build-arg GIT_COMMIT="$(GIT_COMMIT)" \
--build-arg VERSION="$(VERSION)" \
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [Database](#database)
- [H2](#h2)
- [MariaDB and PostgreSQL](#mariadb-and-postgresql)
- [whisper.cpp](#whisper.cpp)
- [Miscellaneous](#miscellaneous)
- [Data](#data)
- [Languages](#languages)
Expand Down Expand Up @@ -50,6 +51,8 @@ If you want to build the images yourself, there is a `Makefile` with the necessa
The name of the Git branch, tag or commit hash to check out. Defaults to the content of the `VERSION_OPENCAST` file.
- `FFMPEG_VERSION`<br>
The version of the Opencast FFmpeg build. Defaults to the content of the `VERSION_FFMPEG` file.
- `WHISPER_CPP_VERSION`<br>
The version of whisper.cpp. Defaults to the content of the `VERSION_WHISPER_CPP` file.
- `IMAGE_REGISTRY`<br>
The first part of the image name. It defaults to `quay.io/opencast` and will be extended by the name of the Opencast distribution.
- `IMAGE_TAG`<br>
Expand All @@ -75,7 +78,7 @@ In the `./docker-compose` directory there are also compose files for more produc

## Images

Opencast comes in different distributions. For each of the official distributions, there is a specific container image. Each version is tagged. For example, the full image name containing the `admin` distribution at version `14.7` is `quay.io/opencast/admin:14.7`. Leaving the version out will install the latest one.
Opencast comes in different distributions. For each of the official distributions, there is a specific container image. Each version is tagged. For example, the full image name containing the `admin` distribution at version `15.0` is `quay.io/opencast/admin:15.0`. Leaving the version out will install the latest one.

### `allinone`

Expand Down Expand Up @@ -200,6 +203,11 @@ There are no additional environment variables you can set if you are using the H
- `ORG_OPENCASTPROJECT_DB_JDBC_PASS` **Required**<br>
Password of the database user. You may alternatively set `ORG_OPENCASTPROJECT_DB_JDBC_PASS_FILE` to the location of a file within the container that contains the password.

### whisper.cpp

- `WHISPER_CPP_DOWNLOAD_MODEL` Optional<br>
Download the specified whisper.cpp model. Note that models are downloaded in parallel to the startup of Opencast. Not waiting for model downloads greatly improves the Opencast startup time. However, transcription operations may fail if models are not available yet. The default is an empty string, i.e. no model is downloaded.

### Miscellaneous

- `TIMEZONE` Optional<br>
Expand All @@ -211,7 +219,7 @@ The data directory is located at `/data`. Use [Docker Volumes](https://docs.dock

## Languages

Opencast makes use of [Tesseract](https://github.com/tesseract-ocr/tesseract) to recognize text in videos (ORC) and [Hunspell](https://hunspell.github.io/) to identify spelling mistakes. Both need additional files namely [traningsdata](https://github.com/tesseract-ocr/tessdata) and [dictionaries](http://download.services.openoffice.org/contrib/dictionaries) respectively. These images come with files for the English language. If you need other or more languages you can use Docker Volumes to mount them in the appropriate directories `/usr/share/tessdata` and `/usr/share/hunspell`.
Opencast makes use of [Tesseract](https://github.com/tesseract-ocr/tesseract) to recognize text in videos (ORC). For this, [training data files](https://github.com/tesseract-ocr/tessdata) are needed. These images come with files for the English language. If you need other or more languages you can extend these images or use Docker Volumes to mount them in the appropriate directories `/usr/share/tessdata`.

## References

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.7
15.0
2 changes: 1 addition & 1 deletion VERSION_FFMPEG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0
6.1
2 changes: 1 addition & 1 deletion VERSION_MAJOR
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
15
2 changes: 1 addition & 1 deletion VERSION_OPENCAST
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.7
15.0
1 change: 1 addition & 0 deletions VERSION_WHISPER_CPP
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.5.2
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.allinone.h2+pyca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
- opensearch:/usr/share/opensearch/data

opencast:
image: quay.io/opencast/allinone:14.7
image: quay.io/opencast/allinone:15.0
environment:
ORG_OPENCASTPROJECT_SERVER_URL: http://opencast:8080
ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.allinone.h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- opensearch:/usr/share/opensearch/data

opencast:
image: quay.io/opencast/allinone:14.7
image: quay.io/opencast/allinone:15.0
environment:
ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080
ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.allinone.mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
- opensearch:/usr/share/opensearch/data

opencast:
image: quay.io/opencast/allinone:14.7
image: quay.io/opencast/allinone:15.0
environment:
ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080
ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.allinone.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
- opensearch:/usr/share/opensearch/data

opencast:
image: quay.io/opencast/allinone:14.7
image: quay.io/opencast/allinone:15.0
environment:
ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080
ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- opensearch:/usr/share/opensearch/data

opencast:
image: quay.io/opencast/build:14.7
image: quay.io/opencast/build:15.0
tty: true
stdin_open: true
environment:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose/docker-compose.multiserver.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
- opensearch:/usr/share/opensearch/data

opencast-admin:
image: quay.io/opencast/build:14.7
image: quay.io/opencast/build:15.0
tty: true
stdin_open: true
environment:
Expand Down Expand Up @@ -71,7 +71,7 @@ services:
- "${OPENCAST_SRC}:/usr/src/opencast"

opencast-presentation:
image: quay.io/opencast/build:14.7
image: quay.io/opencast/build:15.0
tty: true
stdin_open: true
environment:
Expand All @@ -98,7 +98,7 @@ services:
- "${OPENCAST_SRC}:/usr/src/opencast"

opencast-worker:
image: quay.io/opencast/build:14.7
image: quay.io/opencast/build:15.0
tty: true
stdin_open: true
environment:
Expand Down
Loading