updated the Dockerfiles and the pipeline for 5.0.0-beta5

This commit is contained in:
k4yt3x 2022-04-01 06:23:46 +00:00
parent 268460fd17
commit 65c0d32a51
4 changed files with 37 additions and 18 deletions

View File

@ -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 }}

View File

@ -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 <i@k4yt3x.com>" \
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"]

View File

@ -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 <i@k4yt3x.com>" \
org.opencontainers.image.source="https://github.com/k4yt3x/video2x" \
org.opencontainers.image.description="A lossless video/GIF/image upscaler"

View File

@ -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",