2022-02-04 21:00:23 +00:00
|
|
|
# Name: Video2X Dockerfile (Slim Alpine)
|
|
|
|
# Creator: K4YT3X
|
|
|
|
# Date Created: February 1, 2022
|
|
|
|
# Last Modified: February 4, 2022
|
2022-02-02 15:17:27 +00:00
|
|
|
|
|
|
|
# stage: build python components into heels
|
2022-02-10 03:26:01 +00:00
|
|
|
FROM docker.io/library/python:3.10.2-alpine3.15 AS builder
|
2022-02-02 15:17:27 +00:00
|
|
|
COPY . /video2x
|
|
|
|
WORKDIR /video2x
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
cmake g++ gcc git ninja swig \
|
|
|
|
ffmpeg-dev glslang-dev jpeg-dev vulkan-loader-dev zlib-dev \
|
|
|
|
linux-headers \
|
|
|
|
&& pip install -U pip \
|
|
|
|
&& CMAKE_ARGS="-DWITH_FFMPEG=YES" pip wheel -w /wheels opencv-python \
|
|
|
|
&& pip wheel -w /wheels wheel setuptools setuptools_scm \
|
|
|
|
rife-ncnn-vulkan-python@git+https://github.com/media2x/rife-ncnn-vulkan-python.git .
|
|
|
|
|
|
|
|
# stage 2: install wheels into final image
|
2022-02-10 03:26:01 +00:00
|
|
|
FROM docker.io/library/python:3.10.2-alpine3.15
|
2022-02-04 21:00:23 +00:00
|
|
|
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"
|
2022-02-02 15:17:27 +00:00
|
|
|
|
|
|
|
COPY --from=builder /wheels /wheels
|
|
|
|
COPY . /video2x
|
|
|
|
WORKDIR /video2x
|
|
|
|
RUN apk add --no-cache --virtual .run-deps \
|
|
|
|
ffmpeg libgomp libjpeg-turbo libstdc++ \
|
|
|
|
vulkan-loader mesa-vulkan-ati \
|
|
|
|
&& pip install --no-cache-dir -U pip \
|
|
|
|
&& pip install --no-cache-dir --no-index -f /wheels . \
|
|
|
|
&& rm -rf /wheels /video2x
|
2020-05-24 17:24:28 +00:00
|
|
|
|
2020-06-13 10:13:12 +00:00
|
|
|
WORKDIR /host
|
2022-02-02 15:17:27 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/python", "-m", "video2x"]
|