Skip to content

Commit

Permalink
update docker base images
Browse files Browse the repository at this point in the history
  • Loading branch information
baxtree committed Jun 9, 2023
1 parent 5c71ccf commit 5e4c3f3
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 25 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,30 @@ jobs:
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u20
push: true

- name: Build and push the Fedora 31 image
id: docker_build_fed31
uses: docker/build-push-action@v2
with:
context: ./docker
file: "./docker/Dockerfile-Fedora31"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.fed31
push: true
# - name: Build and push the Fedora 37 image
# id: docker_build_fed37
# uses: docker/build-push-action@v2
# with:
# context: ./docker
# file: "./docker/Dockerfile-Fedora37"
# build-args: |
# "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
# allow: network.host
# github-token: ${{ github.token }}
# tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.fed37
# push: true

- name: Build and push the Debian 10 image
id: docker_build_deb10
- name: Build and push the Debian 11 image
id: docker_build_deb11
uses: docker/build-push-action@v2
with:
context: ./docker
file: "./docker/Dockerfile-Debian10"
file: "./docker/Dockerfile-Debian11"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.deb10
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.deb11
push: true

- name: Build and push the ArchLinux image
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endef
export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"

.PHONY: install uninstall build-gzip build-rpm test test-all pydoc coverage manual dist release clean clean-dist clean-doc clean-manual clean-build clean-pyc clean-test clean-rpm
.PHONY: install uninstall build-gzip build-rpm test test-all docker-build pydoc coverage manual dist release clean clean-dist clean-doc clean-manual clean-build clean-pyc clean-test clean-rpm

install:
if [ ! -e ".$(PYTHON)" ]; then ~/.pyenv/versions/$(PYTHON)/bin/python3 -m venv .$(PYTHON); fi
Expand Down Expand Up @@ -180,6 +180,13 @@ app: clean-wheels
STRETCH_OFF=True .$(PYTHON)/bin/python setup.py bdist_wheel -d ./wheels; \
.$(PYTHON)/bin/pex subaligner==$(SUBALIGNER_VERSION) --repo=./wheels --platform $(PLATFORM) --no-pypi --no-build --python-shebang="/usr/bin/env python3" -e subaligner -o subaligner-$(PLATFORM).app; \

docker-build:
docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-Ubuntu20 .
docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-ArchLinux .
docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-CentOS7 .
docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-Debian11 .
docker build --build-arg RELEASE_VERSION=$(SUBALIGNER_VERSION) -f docker/Dockerfile-Fedora37 .

docker-images:
SUBALIGNER_VERSION=$(SUBALIGNER_VERSION) docker-compose -f ./docker/docker-compose.yml build

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-Debian10 → docker/Dockerfile-Debian11
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Subaligner Debian docker image
FROM debian:stable-20211011-slim
FROM debian:stable-20230202-slim

ARG RELEASE_VERSION

Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile-Fedora31 → docker/Dockerfile-Fedora37
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Subaligner Fedora Docker Image
From fedora:31
From fedora:37

ARG RELEASE_VERSION

Expand All @@ -15,6 +15,8 @@ RUN ["/bin/bash", "-c", "dnf install -y dnf-utils &&\
dnf install -y espeak-ng &&\
ln -s /usr/lib64/libespeak-ng.so.1 /usr/lib64/libespeak.so &&\
dnf install -y libsndfile-devel &&\
dnf install -y blas lapack blas-devel lapack-devel &&\
dnf install -y gcc-c++ &&\
dnf install -y python3 &&\
dnf install -y gcc &&\
dnf install -y python3-wheel &&\
Expand Down
8 changes: 4 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ services:
subaligner-debian10:
build:
context: ./
dockerfile: Dockerfile-Debian10
image: baxtree/subaligner:${SUBALIGNER_VERSION}.deb10
dockerfile: Dockerfile-Debian11
image: baxtree/subaligner:${SUBALIGNER_VERSION}.deb11

subaligner-fedora31:
build:
context: ./
dockerfile: Dockerfile-Fedora31
image: baxtree/subaligner:${SUBALIGNER_VERSION}.fed31
dockerfile: Dockerfile-Fedora37
image: baxtree/subaligner:${SUBALIGNER_VERSION}.fed37
2 changes: 1 addition & 1 deletion subaligner/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""The semver for the current release."""
__version__ = "0.3.2"
__version__ = "0.3.3"
2 changes: 1 addition & 1 deletion subaligner/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def transcribe(self, video_file_path: str, language_code: str) -> Tuple[Subtitle
try:
audio = whisper.load_audio(audio_file_path)
self.__LOGGER.debug("Start transcribing the audio...")
result = self.__model.transcribe(audio, task="transcribe", language=LANGUAGES[lang], logprob_threshold=-1.2, no_speech_threshold=0.16)
result = self.__model.transcribe(audio, task="transcribe", language=LANGUAGES[lang])
self.__LOGGER.info("Finished transcribing the audio")
srt_str = ""
for i, segment in enumerate(result["segments"], start=1):
Expand Down

0 comments on commit 5e4c3f3

Please sign in to comment.