Skip to content

Commit

Permalink
refactor nvidia-driver
Browse files Browse the repository at this point in the history
  • Loading branch information
seunAdeks committed Dec 4, 2024
1 parent 5e8fb8a commit 7a54fa7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN sh /tmp/install.sh depinstall && \
ADD drivers drivers/

# Fetch the installer automatically for passthrough/baremetal types
RUN echo $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run
# RUN echo $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run
RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
cd drivers && \
DRIVER_ARCH=${TARGETARCH/amd64/x86_64} && DRIVER_ARCH=${DRIVER_ARCH/arm64/aarch64} && \
Expand All @@ -100,7 +100,9 @@ RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
# dnf module enable -y nvidia-driver:${DRIVER_BRANCH} && \
# dnf install -y ${fmPackage} ${nscqPackage}; fi

COPY nvidia-driver.sh /usr/local/bin/nvidia-driver.sh
COPY nvidia-driver /usr/local/bin

RUN cat /usr/local/bin/nvidia-driver

WORKDIR /usr/src/nvidia-$DRIVER_VERSION

Expand Down Expand Up @@ -138,4 +140,4 @@ RUN if [ -n "${CVE_UPDATES}" ]; then \
# Remove cuda repository to avoid GPG errors
RUN rm -f /etc/yum.repos.d/cuda.repo

ENTRYPOINT ["/usr/local/bin/nvidia-driver.sh", "init"]
ENTRYPOINT ["nvidia-driver", "init"]
File renamed without changes.

0 comments on commit 7a54fa7

Please sign in to comment.