mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
update Dockerfile-CUDA (#5689)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# This dockerfile should be built with `make docker-cuda-build` from the stash root.
|
# This dockerfile should be built with `make docker-cuda-build` from the stash root.
|
||||||
|
ARG CUDA_VERSION=12.8.0
|
||||||
|
|
||||||
# Build Frontend
|
# Build Frontend
|
||||||
FROM node:20-alpine AS frontend
|
FROM node:20-alpine AS frontend
|
||||||
@@ -34,19 +35,26 @@ ARG STASH_VERSION
|
|||||||
RUN make flags-release flags-pie stash
|
RUN make flags-release flags-pie stash
|
||||||
|
|
||||||
# Final Runnable Image
|
# Final Runnable Image
|
||||||
FROM nvidia/cuda:12.0.1-base-ubuntu22.04
|
FROM nvidia/cuda:${CUDA_VERSION}-base-ubuntu24.04
|
||||||
RUN apt update && apt upgrade -y && apt install -y ca-certificates libvips-tools ffmpeg wget intel-media-va-driver-non-free vainfo
|
RUN apt update && apt upgrade -y && apt install -y \
|
||||||
RUN rm -rf /var/lib/apt/lists/*
|
# stash dependencies
|
||||||
COPY --from=backend /stash/stash /usr/bin/
|
ca-certificates libvips-tools ffmpeg \
|
||||||
|
# intel dependencies
|
||||||
|
intel-media-va-driver-non-free vainfo \
|
||||||
|
# python tools
|
||||||
|
python3 python3-pip && \
|
||||||
|
# cleanup
|
||||||
|
apt autoremove -y && apt clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
COPY --from=backend --chmod=555 /stash/stash /usr/bin/
|
||||||
|
|
||||||
# NVENC Patch
|
# NVENC Patch
|
||||||
RUN mkdir -p /usr/local/bin /patched-lib
|
RUN mkdir -p /usr/local/bin /patched-lib
|
||||||
RUN wget https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh -O /usr/local/bin/patch.sh
|
ADD --chmod=555 https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh /usr/local/bin/patch.sh
|
||||||
RUN wget https://raw.githubusercontent.com/keylase/nvidia-patch/master/docker-entrypoint.sh -O /usr/local/bin/docker-entrypoint.sh
|
ADD --chmod=555 https://raw.githubusercontent.com/keylase/nvidia-patch/master/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
RUN chmod +x /usr/local/bin/patch.sh /usr/local/bin/docker-entrypoint.sh /usr/bin/stash
|
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
ENV LANG=C.UTF-8
|
||||||
ENV NVIDIA_VISIBLE_DEVICES all
|
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES=video,utility
|
ENV NVIDIA_DRIVER_CAPABILITIES=video,utility
|
||||||
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
|
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
|
||||||
EXPOSE 9999
|
EXPOSE 9999
|
||||||
|
|||||||
Reference in New Issue
Block a user