Skip to content

Commit

Permalink
fix Docker deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Oct 23, 2024
1 parent 8d48bc1 commit d6a5a28
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BASEIMAGE
FROM ${BASEIMAGE} as prerequisites
FROM ${BASEIMAGE} AS prerequisites

{% if not disable_labels %}
# Add a sentinel label so we can easily identify all derived images, including intermediate images
Expand All @@ -11,15 +11,15 @@ ENV DEBIAN_FRONTEND=noninteractive

# Enable CUDA support for NVIDIA GPUs (even when not using a CUDA base image), since evidently some versions of UE unconditionally assume
# `libcuda.so.1` exists when using the NVIDIA proprietary drivers, and will fail to initialise the Vulkan RHI if it is missing
ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES},compute
ENV NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES},compute

# Add the "display" driver capability for NVIDIA GPUs
# (This allows us to run the Editor from an interactive container by bind-mounting the host system's X11 socket)
ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES},display
ENV NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES},display

# Enable NVENC support for use by Unreal Engine plugins that depend on it (e.g. Pixel Streaming)
# (Note that adding `video` seems to implicitly enable `compute` as well, but we include separate directives here to clearly indicate the purpose of both)
ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES},video
ENV NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES},video

# Install our build prerequisites
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
ARG BASEIMAGE
ARG DLLSRCIMAGE

FROM ${DLLSRCIMAGE} as dlls
FROM ${DLLSRCIMAGE} AS dlls

FROM ${BASEIMAGE} as deduplication
FROM ${BASEIMAGE} AS deduplication
SHELL ["cmd", "/S", "/C"]

{% if not disable_labels %}
Expand Down Expand Up @@ -43,7 +43,7 @@ COPY remove-duplicate-dlls.ps1 C:\remove-duplicate-dlls.ps1
RUN powershell -ExecutionPolicy Bypass -File C:\remove-duplicate-dlls.ps1

# Copy the DLL files into a clean image
FROM ${BASEIMAGE} as prerequisites
FROM ${BASEIMAGE} AS prerequisites
SHELL ["cmd", "/S", "/C"]
COPY --from=deduplication C:\GatheredDlls\ C:\Windows\System32\

Expand Down
2 changes: 1 addition & 1 deletion src/ue4docker/dockerfiles/ue4-full/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ USER ue4

# Explicitly set the configuration directory for ue4cli
# (This prevents things from breaking when using CI/CD systems that override the $HOME environment variable)
ENV UE4CLI_CONFIG_DIR /home/ue4/.config/ue4cli
ENV UE4CLI_CONFIG_DIR=/home/ue4/.config/ue4cli

# Copy the Conan configuration settings and package cache from the previous build stage
COPY --from=conan --chown=ue4:ue4 /home/ue4/.conan /home/ue4/.conan
Expand Down
2 changes: 1 addition & 1 deletion src/ue4docker/dockerfiles/ue4-full/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN pip install "%CONAN_VERSION%" "%UE4CLI_VERSION%" "%CONAN_UE4CLI_VERSION%" ue

# Explicitly set the configuration directory for ue4cli
# (This prevents things from breaking when using CI/CD systems that override the $HOME environment variable)
ENV UE4CLI_CONFIG_DIR C:\Users\ContainerAdministrator\AppData\Roaming\ue4cli
ENV UE4CLI_CONFIG_DIR=C:\Users\ContainerAdministrator\AppData\Roaming\ue4cli

# Copy the Conan configuration settings and package cache from the previous build stage
COPY --from=conan C:\Users\ContainerAdministrator\.conan C:\Users\ContainerAdministrator\.conan
Expand Down

0 comments on commit d6a5a28

Please sign in to comment.