Skip to content

Commit

Permalink
publsh multi-platform images
Browse files Browse the repository at this point in the history
  • Loading branch information
baxtree committed Aug 24, 2023
1 parent ae382af commit 7be99f7
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 70 deletions.
69 changes: 33 additions & 36 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,70 +9,81 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: checkout repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: baxtree/subaligner:latest


- name: Extract the tag
id: tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/v/}

- name: Build and push the latest image
id: docker_build_latest
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./docker
file: "./docker/Dockerfile-Ubuntu20"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
platforms: linux/amd64,linux/arm64
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:latest
push: true

- name: Build and push the Ubuntu 20 image
id: docker_build_u20
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./docker
file: "./docker/Dockerfile-Ubuntu20"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
platforms: linux/amd64,linux/arm64
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u20
push: true

- name: Build and push the Ubuntu 22 image
- name: Build and push the Ubuntu 22 AMD64 image
id: docker_build_u22
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: ./docker
file: "./docker/Dockerfile-Ubuntu22"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
platforms: linux/amd64
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u22
push: true

# - name: Build and push the Ubuntu 22 ARM64 image
# id: docker_build_u22
# uses: docker/build-push-action@v2
# with:
# context: ./docker
# file: "./docker/Dockerfile-Ubuntu22-ARM64"
# build-args: |
# "RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
# platforms: linux/arm64
# allow: network.host
# github-token: ${{ github.token }}
# tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u22-arm64
# push: true

- name: Build and push the Fedora 34 image
id: docker_build_fed34
uses: docker/build-push-action@v2
Expand All @@ -81,6 +92,7 @@ jobs:
file: "./docker/Dockerfile-Fedora34"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
platforms: linux/amd64,linux/arm64
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.fed34
Expand All @@ -94,23 +106,8 @@ jobs:
file: "./docker/Dockerfile-ArchLinux"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
platforms: linux/amd64
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.arch
push: true

- name: Build and push the CentOS 7 image
id: docker_build_el7
uses: docker/build-push-action@v2
with:
context: ./docker
file: "./docker/Dockerfile-CentOS7"
build-args: |
"RELEASE_VERSION=${{ steps.tag.outputs.TAG }}"
allow: network.host
github-token: ${{ github.token }}
tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.el7
push: true

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
1 change: 0 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ chardet = "~=3.0.4"
click = "==5.1"
cloudpickle = "==0.5.3"
cycler = "==0.10.0"
dask = ">=2021.10.0,<2022.1.0"
decorator = "==4.3.0"
distributed = "==1.13.0"
filelock = "<4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="./figures/subaligner.png" alt="subaligner" width="300" />
<img src="https://raw.githubusercontent.com/baxtree/subaligner/master/figures/subaligner.png" alt="subaligner" width="300" />
</div>

[![Build Status](https://github.com/baxtree/subaligner/actions/workflows/ci-pipeline.yml/badge.svg?branch=master)](https://github.com/baxtree/subaligner/actions/workflows/ci-pipeline.yml?query=branch%3Amaster) ![Codecov](https://img.shields.io/codecov/c/github/baxtree/subaligner)
Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile-ArchLinux
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ RUN ["/bin/bash", "-c", "pacman --noconfirm -Syu &&\
/usr/sbin/pyenv install 3.8.12 &&\
/usr/sbin/pyenv local 3.8.12 &&\
ln -s /root/.pyenv/versions/3.8.12/bin/python /usr/bin/python &&\
python -m venv venv &&\
source venv/bin/activate &&\
python -m pip install --upgrade pip &&\
python -m pip install wheel &&\
python -m pip install \"subaligner==${RELEASE_VERSION}\" &&\
Expand Down
43 changes: 24 additions & 19 deletions docker/Dockerfile-CentOS7
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# Subaligner CentOS 7 Docker Image
From centos:7
From centos:8

ARG RELEASE_VERSION

ENV RELEASE_VERSION=${RELEASE_VERSION}

RUN ["/bin/bash", "-c", "yum install -y epel-release &&\
yum update -y &&\
yum groupinstall -y \"Development Tools\" &&\
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm &&\
yum install -y openssl-devel bzip2-devel libffi-devel xz-devel &&\
yum install -y wget &&\
yum install -y ffmpeg &&\
yum install -y espeak espeak-devel &&\
yum install -y libsndfile-devel &&\
yum install -y gcc &&\
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz &&\
tar xvf Python-3.8.12.tgz &&\
cd Python-3.8.12 &&\
./configure --enable-optimizations &&\
make altinstall &&\
python3.8 -m pip install --upgrade pip &&\
python3.8 -m pip install \"subaligner==${RELEASE_VERSION}\" &&\
python3.8 -m pip install \"subaligner[harmony]==${RELEASE_VERSION}\""]
RUN cd /etc/yum.repos.d/
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN ["/bin/bash", "-c", "dnf install -y epel-release dnf-utils &&\
dnf upgrade -y openssl-libs bind-export-libs &&\
dnf config-manager --set-enabled powertools &&\
dnf install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm &&\
dnf install -y ffmpeg &&\
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 python3 &&\
dnf install -y gcc &&\
dnf install -y python3-wheel &&\
dnf install -y python3-devel &&\
dnf install -y python3-pip &&\
dnf makecache &&\
dnf upgrade python3-pip &&\
python3 -m pip install --upgrade pip &&\
python3 -m pip install --upgrade setuptools wheel &&\
python3 -m pip install \"subaligner==${RELEASE_VERSION}\" &&\
python3 -m pip install \"subaligner[llm]==${RELEASE_VERSION}\""]
2 changes: 0 additions & 2 deletions docker/Dockerfile-Debian11
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ RUN ["/bin/bash", "-c", "apt -y update &&\
apt -y install python3-tk &&\
apt -y install python3-pip &&\
apt -y install python3-venv &&\
python3 -m venv .venv &&\
source .venv/bin/activate &&\
python3 -m pip install --upgrade pip &&\
python3 -m pip install \"subaligner==${RELEASE_VERSION}\" &&\
python3 -m pip install \"subaligner[harmony]==${RELEASE_VERSION}\""]
1 change: 1 addition & 0 deletions docker/Dockerfile-Ubuntu20
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN ["/bin/bash", "-c", "apt-get -y update &&\
apt-get -y install ffmpeg &&\
apt-get -y install espeak libespeak1 libespeak-dev espeak-data &&\
apt-get -y install libsndfile-dev &&\
apt-get -y install libhdf5-dev &&\
apt-get -y install python3-dev &&\
apt-get -y install python3-tk &&\
apt-get -y install python3-pip &&\
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile-Ubuntu22
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ RUN ["/bin/bash", "-c", "apt-get -y update &&\
apt-get -y install ffmpeg &&\
apt-get -y install espeak libespeak1 libespeak-dev espeak-data &&\
apt-get -y install libsndfile-dev &&\
apt-get -y install libhdf5-dev &&\
apt-get -y install python3-dev &&\
apt-get -y install python3-tk &&\
apt-get -y install python3-pip &&\
python3 -m pip install --upgrade pip &&\
python3 -m pip install --upgrade setuptools wheel &&\
python3 -m pip install \"subaligner==${RELEASE_VERSION}\" &&\
python3 -m pip install \"subaligner[harmony]==${RELEASE_VERSION}\""]
20 changes: 20 additions & 0 deletions docker/Dockerfile-Ubuntu22-ARM64
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Subaligner Ubuntu 22 Docker Image
FROM arm64v8/ubuntu:22.10

ARG RELEASE_VERSION

ENV RELEASE_VERSION=${RELEASE_VERSION}
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London

RUN ["/bin/bash", "-c", "apt-get -y update &&\
apt-get -y install ffmpeg &&\
apt-get -y install espeak libespeak1 libespeak-dev espeak-data &&\
apt-get -y install libsndfile-dev &&\
apt-get -y install python3-dev &&\
apt-get -y install python3-tk &&\
apt-get -y install python3-pip &&\
apt-get -y install libhdf5-dev &&\
python3 -m pip install --upgrade pip &&\
python3 -m pip install \"subaligner==${RELEASE_VERSION}\" &&\
python3 -m pip install \"subaligner[harmony]==${RELEASE_VERSION}\""]
6 changes: 0 additions & 6 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ services:
dockerfile: Dockerfile-CentOS7
image: baxtree/subaligner:${SUBALIGNER_VERSION}.el7

subaligner-ubuntu18:
build:
context: ./
dockerfile: Dockerfile-Ubuntu18
image: baxtree/subaligner:${SUBALIGNER_VERSION}.u18

subaligner-ubuntu20:
build:
context: ./
Expand Down
1 change: 0 additions & 1 deletion requirements-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ chardet==3.0.4
click==5.1
cloudpickle~=1.6.0
cycler==0.10.0
dask>=2021.10.0,<2022.1.0
decorator==4.3.0
distributed==1.13.0
filelock<4.0.0
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ chardet~=3.0.4
click==5.1
cloudpickle~=1.6.0
cycler==0.10.0
dask>=2021.10.0,<2022.1.0
decorator==4.3.0
distributed==1.13.0
filelock<4.0.0
Expand Down
2 changes: 1 addition & 1 deletion site/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"sklearn",
"tensorflow",
"pysubs2",
"cchardet",
"chardet",
"captionstransformer",
"bs4",
"transformers",
Expand Down

0 comments on commit 7be99f7

Please sign in to comment.