diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 375c9a0..8249cb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,21 +40,39 @@ jobs: needs: - setup - create-release - strategy: - matrix: - version: - - slim-alpine - - cuda runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 - uses: mr-smithers-excellent/docker-build-push@v5 - name: Build & push Docker image + name: Build & push the Docker image + with: + registry: ghcr.io + username: ${{ secrets.GHCR_USER }} + password: ${{ secrets.GHCR_TOKEN }} + dockerfile: Dockerfile + image: video2x + tags: latest, ${{ needs.setup.outputs.tag }} + + container-variants: + name: Build and upload variants of the container + needs: + - setup + - create-release + strategy: + matrix: + version: + - slim-alpine + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - uses: mr-smithers-excellent/docker-build-push@v5 + name: Build & push the Docker image with: registry: ghcr.io username: ${{ secrets.GHCR_USER }} password: ${{ secrets.GHCR_TOKEN }} dockerfile: Dockerfile.${{ matrix.version }} image: video2x - tags: latest, ${{ needs.setup.outputs.tag }}-${{ matrix.version }} + tags: ${{ needs.setup.outputs.tag }}-${{ matrix.version }} diff --git a/Dockerfile.cuda b/Dockerfile similarity index 75% rename from Dockerfile.cuda rename to Dockerfile index 4a7f905..b9cbbc7 100644 --- a/Dockerfile.cuda +++ b/Dockerfile @@ -1,23 +1,23 @@ -# Name: Video2X Dockerfile (CUDA) +# Name: Video2X Dockerfile # Creator: K4YT3X # Date Created: February 3, 2022 -# Last Modified: March 20, 2022 +# Last Modified: March 28, 2022 # stage 1: build the python components into wheels -FROM docker.io/nvidia/cuda:11.6.0-runtime-ubuntu20.04 AS builder +FROM docker.io/nvidia/vulkan:1.2.133-450 AS builder ENV DEBIAN_FRONTEND=noninteractive COPY . /video2x WORKDIR /video2x RUN apt-get update \ && apt-get install -y --no-install-recommends \ - python3-pip python3-opencv python3-pil \ - python3-dev libvulkan-dev glslang-dev glslang-tools \ + python3.8 python3-pip python3-opencv python3-pil \ + python3.8-dev libvulkan-dev glslang-dev glslang-tools \ build-essential swig \ && pip wheel -w /wheels wheel pdm-pep517 . # stage 2: install wheels into the final image -FROM docker.io/nvidia/cuda:11.6.0-runtime-ubuntu20.04 +FROM docker.io/nvidia/vulkan:1.2.133-450 LABEL maintainer="K4YT3X " \ org.opencontainers.image.source="https://github.com/k4yt3x/video2x" \ org.opencontainers.image.description="A lossless video/GIF/image upscaler" @@ -31,7 +31,7 @@ COPY --from=builder /wheels /wheels COPY . /video2x WORKDIR /video2x RUN apt-get install -y --no-install-recommends \ - python3-pip python3-dev \ + python3-pip python3.8-dev \ python3-opencv python3-pil \ mesa-vulkan-drivers cuda-drivers ffmpeg \ && pip install --no-cache-dir --no-index -f /wheels . \ @@ -39,4 +39,5 @@ RUN apt-get install -y --no-install-recommends \ && rm -rf /wheels /video2x /var/lib/apt/lists/* WORKDIR /host -ENTRYPOINT ["/usr/bin/python3", "-m", "video2x"] +USER nobody +ENTRYPOINT ["/usr/bin/python3.8", "-m", "video2x"] diff --git a/Dockerfile.slim-alpine b/Dockerfile.slim-alpine index 5de45e4..7e35391 100644 --- a/Dockerfile.slim-alpine +++ b/Dockerfile.slim-alpine @@ -4,7 +4,7 @@ # Last Modified: March 18, 2022 # stage: build python components into heels -FROM docker.io/library/python:3.10.2-alpine3.15 AS builder +FROM docker.io/library/python:3.10.4-alpine3.15 AS builder COPY . /video2x WORKDIR /video2x RUN apk add --no-cache \ @@ -15,7 +15,7 @@ RUN apk add --no-cache \ && pip wheel -w /wheels wheel pdm-pep517 . # stage 2: install wheels into final image -FROM docker.io/library/python:3.10.2-alpine3.15 +FROM docker.io/library/python:3.10.4-alpine3.15 LABEL maintainer="K4YT3X " \ org.opencontainers.image.source="https://github.com/k4yt3x/video2x" \ org.opencontainers.image.description="A lossless video/GIF/image upscaler" diff --git a/pyproject.toml b/pyproject.toml index a8bc10e..a2a3db4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "opencv-python>=4.5.5.64", "pillow>=9.0.1", "rich>=12.0.0", - "waifu2x-ncnn-vulkan-python>=1.0.1", + "waifu2x-ncnn-vulkan-python>=1.0.2rc3", "srmd-ncnn-vulkan-python>=1.0.2", "realsr-ncnn-vulkan-python>=1.0.4", "rife-ncnn-vulkan-python>=1.1.2.post3",