mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 06:59:11 +00:00
build(container): optimize container build speed
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
parent
39a1828a3b
commit
2cfdb698c9
@ -1,18 +1,19 @@
|
|||||||
pkgname=video2x-git
|
pkgname=video2x-git
|
||||||
pkgver=0
|
pkgver=6.0.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="A machine learning-based video super resolution and frame interpolation framework"
|
pkgdesc="A machine learning-based video super resolution and frame interpolation framework"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://github.com/k4yt3x/video2x"
|
url="https://github.com/k4yt3x/video2x"
|
||||||
license=('AGPL3')
|
license=('AGPL-3.0-only')
|
||||||
depends=('ffmpeg' 'ncnn' 'vulkan-driver' 'spdlog' 'boost-libs')
|
depends=('ffmpeg' 'ncnn' 'vulkan-driver' 'spdlog' 'boost-libs')
|
||||||
makedepends=('git' 'cmake' 'clang' 'vulkan-headers' 'openmp' 'boost')
|
makedepends=('git' 'cmake' 'clang' 'vulkan-headers' 'openmp' 'boost')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
git rm ../third_party/{ncnn,spdlog,boost}
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Name: Video2X Dockerfile
|
# Name: Video2X Dockerfile
|
||||||
# Creator: K4YT3X
|
# Creator: K4YT3X
|
||||||
# Date Created: February 3, 2022
|
# Date Created: February 3, 2022
|
||||||
# Last Modified: November 1, 2024
|
# Last Modified: December 23, 2024
|
||||||
|
|
||||||
# stage 1: build the python components into wheels
|
# stage 1: build the python components into wheels
|
||||||
FROM docker.io/archlinux:latest AS builder
|
FROM docker.io/archlinux:latest AS builder
|
||||||
@ -17,11 +17,11 @@ RUN pacman -Syy --noconfirm \
|
|||||||
# Switch to the non-root user and copy the source code
|
# Switch to the non-root user and copy the source code
|
||||||
USER builder
|
USER builder
|
||||||
COPY --chown=builder:builder . /video2x
|
COPY --chown=builder:builder . /video2x
|
||||||
|
COPY --chown=builder:builder packaging/arch/PKGBUILD /video2x/PKGBUILD
|
||||||
WORKDIR /video2x
|
WORKDIR /video2x
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
RUN cp packaging/arch/PKGBUILD . \
|
RUN makepkg -s --noconfirm \
|
||||||
&& makepkg -s --noconfirm \
|
|
||||||
&& find /video2x -maxdepth 1 -name 'video2x-*.pkg.tar.zst' ! -name '*-debug-*' | head -n 1 | \
|
&& find /video2x -maxdepth 1 -name 'video2x-*.pkg.tar.zst' ! -name '*-debug-*' | head -n 1 | \
|
||||||
xargs -I {} cp {} /tmp/video2x.pkg.tar.zst
|
xargs -I {} cp {} /tmp/video2x.pkg.tar.zst
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user