diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 4a02ec9..a8081a8 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -9,39 +9,34 @@ 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 @@ -49,12 +44,13 @@ jobs: - 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 @@ -62,12 +58,13 @@ jobs: - name: Build and push the Ubuntu 22 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,linux/arm64 allow: network.host github-token: ${{ github.token }} tags: baxtree/subaligner:${{ steps.tag.outputs.TAG }}.u22 @@ -81,6 +78,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 @@ -94,23 +92,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 }} diff --git a/Pipfile b/Pipfile index 1a4f1a7..a605258 100644 --- a/Pipfile +++ b/Pipfile @@ -33,14 +33,13 @@ 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" google-pasta = "~=0.2" graphviz = "==0.8.3" HeapDict = "==1.0.0" -h5py = "<=3.6.0" +h5py = "<4.0.0" html5lib = "==1.0b9" hyperopt = "==0.2.4" idna = "==2.8" diff --git a/README.md b/README.md index c34e715..b0afd29 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- subaligner + subaligner
[![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) diff --git a/docker/Dockerfile-ArchLinux b/docker/Dockerfile-ArchLinux index 8f1c49b..f8be6df 100644 --- a/docker/Dockerfile-ArchLinux +++ b/docker/Dockerfile-ArchLinux @@ -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}\" &&\ diff --git a/docker/Dockerfile-CentOS7 b/docker/Dockerfile-CentOS7 index 8b5749d..3c93772 100644 --- a/docker/Dockerfile-CentOS7 +++ b/docker/Dockerfile-CentOS7 @@ -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}\""] diff --git a/docker/Dockerfile-Debian11 b/docker/Dockerfile-Debian11 index a1fdf84..31a06b7 100644 --- a/docker/Dockerfile-Debian11 +++ b/docker/Dockerfile-Debian11 @@ -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}\""] diff --git a/docker/Dockerfile-Ubuntu20 b/docker/Dockerfile-Ubuntu20 index 297bb4e..d4f9947 100644 --- a/docker/Dockerfile-Ubuntu20 +++ b/docker/Dockerfile-Ubuntu20 @@ -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 &&\ diff --git a/docker/Dockerfile-Ubuntu22 b/docker/Dockerfile-Ubuntu22 index 23974e5..77b60c9 100644 --- a/docker/Dockerfile-Ubuntu22 +++ b/docker/Dockerfile-Ubuntu22 @@ -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}\""] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c68b25b..35921e5 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -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: ./ diff --git a/requirements-arm64.txt b/requirements-arm64.txt index 92ff604..3d755fa 100644 --- a/requirements-arm64.txt +++ b/requirements-arm64.txt @@ -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 @@ -16,7 +15,7 @@ google-auth-oauthlib==0.4.2 google-pasta~=0.2 graphviz==0.8.3 HeapDict==1.0.0 -h5py<=4.0.0 +h5py<4.0.0 html5lib==1.0b9 hyperopt==0.2.4 idna==2.8 diff --git a/requirements.txt b/requirements.txt index 167d439..cfa7564 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,14 +8,13 @@ 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 google-pasta~=0.2 graphviz==0.8.3 HeapDict==1.0.0 -h5py<=3.6.0 +h5py<4.0.0 html5lib==1.0b9 hyperopt==0.2.4 idna==2.8 diff --git a/setup.py b/setup.py index b84e1a4..358a848 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with open("README.md") as readme_file: readme = readme_file.read() -if machine() == "arm64": +if sys.platform == "darwin" and machine() == "arm64": with open("requirements-arm64.txt") as requirements_file: requirements = requirements_file.read().splitlines()[::-1] else: @@ -50,10 +50,6 @@ def get_tag(self): python = f"py{sys.version_info.major}{sys.version_info.minor}" if sys.platform == "darwin" and architecture == "arm64": os_arch = "macosx_11_0_arm64" - elif sys.platform == "win32": - os_arch = "win32" if architecture == "32bit" else "win_amd64" - # elif sys.platform == "linux": - # os_arch = f"manylinux_2_17_{architecture}" else: os_arch = "any" return python, "none", os_arch diff --git a/site/source/conf.py b/site/source/conf.py index f92d723..1abe453 100644 --- a/site/source/conf.py +++ b/site/source/conf.py @@ -87,7 +87,7 @@ "sklearn", "tensorflow", "pysubs2", - "cchardet", + "chardet", "captionstransformer", "bs4", "transformers",