Skip to content

Commit

Permalink
fix(dockerfile): fixed the Dockerfile to work with the latest code
Browse files Browse the repository at this point in the history
Signed-off-by: k4yt3x <i@k4yt3x.com>
  • Loading branch information
k4yt3x committed Feb 9, 2024
1 parent b382f39 commit 7de040b
Show file tree
Hide file tree
Showing 4 changed files with 338 additions and 335 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
@@ -1,7 +1,7 @@
# Name: Video2X Dockerfile
# Creator: K4YT3X
# Date Created: February 3, 2022
# Last Modified: August 28, 2022
# Last Modified: February 9, 2024

# stage 1: build the python components into wheels
FROM docker.io/nvidia/vulkan:1.3-470 AS builder
Expand All @@ -13,10 +13,10 @@ RUN gpg --keyserver=keyserver.ubuntu.com --receive-keys A4B469963BF863CC \
&& gpg --export A4B469963BF863CC > /etc/apt/trusted.gpg.d/cuda.gpg
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3.8 python3-pip python3-opencv python3-pil \
python3.8-dev libvulkan-dev glslang-dev glslang-tools \
python3.9 python3-pip python3-opencv python3-pil \
python3.9-dev libvulkan-dev glslang-dev glslang-tools \
build-essential swig \
&& pip wheel -w /wheels wheel pdm-pep517 .
&& python3.9 -m pip wheel -w /wheels wheel pdm-backend '.[all]'

# stage 2: install wheels into the final image
FROM docker.io/nvidia/vulkan:1.3-470
Expand All @@ -33,12 +33,12 @@ COPY --from=builder /wheels /wheels
COPY . /video2x
WORKDIR /video2x
RUN apt-get install -y --no-install-recommends \
python3-pip python3.8-dev \
python3.9 python3-pip python3.9-dev \
python3-opencv python3-pil \
mesa-vulkan-drivers cuda-drivers ffmpeg \
&& pip install --no-cache-dir --no-index -f /wheels . \
&& python3.9 -m pip install --no-cache-dir --no-index -f /wheels '.[all]' \
&& apt-get clean \
&& rm -rf /wheels /video2x /var/lib/apt/lists/*

WORKDIR /host
ENTRYPOINT ["/usr/bin/python3.8", "-m", "video2x"]
ENTRYPOINT ["/usr/bin/python3.9", "-m", "video2x"]

0 comments on commit 7de040b

Please sign in to comment.