Skip to content

Commit

Permalink
install DLL through GH and inject it in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Jan 16, 2024
1 parent 0146be7 commit a48d499
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
with:
lfs: true

- name: Install Vulkan SDK
uses: jakoch/[email protected]
with:
vulkan_version: 1.3.268.0
optional_components: com.lunarg.vulkan.vma
install_runtime: true
cache: true
destination: ${{ github.workspace }}/vulkan-sdt

- name: Build Docker image
run: docker build -t lods .
run: docker build -t lods --build-arg VULKAN_DLL_PATH=./vulkan-sdt/1.3.268.0/runtime/x64/vulkan-1.dll .

23 changes: 3 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,8 @@ RUN powershell -Command \
Remove-Item -Force C:\\yarn.msi

WORKDIR /bin
# install Vulkan SDK
RUN powershell -Command echo "Downloading Vulkan SDK..."
RUN powershell -Command Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe -OutFile VulkanSDK-Installer.exe

RUN powershell -Command echo "Installing Vulkan SDK..."
# RUN powershell -Command Start-Process -Wait -PassThru -FilePath .\VulkanSDK-Installer.exe -ArgumentList '--accept-licenses', '--default-answer', '--confirm-command', 'install', '--root', 'C:\VulkanSDKCustom'
RUN .\VulkanSDK-Installer.exe --accept-licenses --default-answer --confirm-command install --root C:\VulkanSDKCustom
RUN powershell -Command echo "Vulkan SDK installed!"

RUN powershell -Command echo "Removing Vulkan SDK installer..."
RUN powershell -Command Remove-Item -Force VulkanSDK-Installer.exe

#print VULKAN_SDK env variable
RUN powershell -Command echo "VULKAN_SDK env variable:"
RUN powershell -Command echo $env:VULKAN_SDK

RUN cd C:\VulkanSDKCustom && dir
RUN cd C:\VulkanSDKCustom\Bin && dir
RUN cd C:\VulkanSDKCustom\Lib && dir
# Copy Vulkan SDK
COPY ${VULKAN_DLL_PATH} ./vulkan-1.dll

# build scene-lod
FROM base as scene-lod-build
Expand Down Expand Up @@ -93,7 +76,7 @@ RUN setx /M PATH "%PATH%;C:\Node\node-v18.0.0-win-x64"
WORKDIR /app

# Copy Vulkan dll
COPY --from=base /VulkanSDKCustom/vulkan-1.dll .
COPY --from=base /bin/vulkan-1.dll .

COPY --from=dotnet-build /app/api/publish/DCL_PiXYZ.exe .

Expand Down

0 comments on commit a48d499

Please sign in to comment.