2022-04-01 06:23:46 +00:00
|
|
|
# Name: Video2X Dockerfile
|
2022-02-04 21:00:38 +00:00
|
|
|
# Creator: K4YT3X
|
|
|
|
# Date Created: February 3, 2022
|
2022-04-01 06:23:46 +00:00
|
|
|
# Last Modified: March 28, 2022
|
2022-02-04 21:00:38 +00:00
|
|
|
|
|
|
|
# stage 1: build the python components into wheels
|
2022-04-01 06:23:46 +00:00
|
|
|
FROM docker.io/nvidia/vulkan:1.2.133-450 AS builder
|
2022-02-04 21:00:38 +00:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
COPY . /video2x
|
|
|
|
WORKDIR /video2x
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends \
|
2022-04-01 06:23:46 +00:00
|
|
|
python3.8 python3-pip python3-opencv python3-pil \
|
|
|
|
python3.8-dev libvulkan-dev glslang-dev glslang-tools \
|
2022-02-27 02:39:48 +00:00
|
|
|
build-essential swig \
|
|
|
|
&& pip wheel -w /wheels wheel pdm-pep517 .
|
2022-02-04 21:00:38 +00:00
|
|
|
|
|
|
|
# stage 2: install wheels into the final image
|
2022-04-01 06:23:46 +00:00
|
|
|
FROM docker.io/nvidia/vulkan:1.2.133-450
|
2022-02-04 21:00:38 +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"
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2022-03-21 00:21:00 +00:00
|
|
|
ENV VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json\
|
|
|
|
:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json\
|
|
|
|
:/usr/share/vulkan/icd.d/intel_icd.x86_64.json
|
2022-02-04 21:00:38 +00:00
|
|
|
|
|
|
|
COPY --from=builder /var/lib/apt/lists* /var/lib/apt/lists/
|
|
|
|
COPY --from=builder /wheels /wheels
|
|
|
|
COPY . /video2x
|
|
|
|
WORKDIR /video2x
|
|
|
|
RUN apt-get install -y --no-install-recommends \
|
2022-04-01 06:23:46 +00:00
|
|
|
python3-pip python3.8-dev \
|
2022-02-12 09:08:05 +00:00
|
|
|
python3-opencv python3-pil \
|
2022-03-18 23:10:40 +00:00
|
|
|
mesa-vulkan-drivers cuda-drivers ffmpeg \
|
2022-02-04 21:00:38 +00:00
|
|
|
&& pip install --no-cache-dir --no-index -f /wheels . \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /wheels /video2x /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
WORKDIR /host
|
2022-04-01 06:23:46 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/python3.8", "-m", "video2x"]
|