-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
79 lines (61 loc) · 2.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# escape=`
#
# Author:
# Andriy Babak <ababak@gmail.com>
#
# Build the docker image:
# docker build --rm -t usd-build .
# See README.md for details
FROM mcr.microsoft.com/windows/servercore:ltsc2019 as base
LABEL maintainer="ababak@gmail.com"
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe
ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
# Install MSVC C++ compiler, CMake, and MSBuild.
RUN C:\TEMP\vs_buildtools.exe `
--quiet --wait --norestart --nocache `
--installPath C:\BuildTools `
--channelUri C:\TEMP\VisualStudio.chman `
--installChannelUri C:\TEMP\VisualStudio.chman `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `
--add Microsoft.Component.MSBuild `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
# Install Chocolatey package manager
RUN powershell.exe -ExecutionPolicy RemoteSigned `
iex (New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'); `
&& SET "PATH=%PATH%;%ALLUSERSPROFILE%/chocolatey/bin"
# Install Chocolatey packages
RUN powershell.exe -ExecutionPolicy RemoteSigned `
choco install python2 -y -o -ia "'/qn /norestart ALLUSERS=1 TARGETDIR=c:\Python27'"; `
choco install 7zip -y; `
choco install nasm -y; `
choco install git -y; `
choco install ninja -y
RUN setx `
PATH "%PATH%;%PROGRAMFILES%/Git/bin;%PROGRAMFILES%/NASM;%PROGRAMFILES%/7-Zip;C:/Python27/Scripts"
# Install Python packages
RUN powershell.exe -ExecutionPolicy RemoteSigned `
python -m pip install --upgrade pip`
pyside `
pyopengl `
jinja2
ENV PYTHONIOENCODING UTF-8
# Download USD
RUN powershell.exe -ExecutionPolicy RemoteSigned `
git clone --depth 1 https://github.com/PixarAnimationStudios/USD C:/usd
# Patch the include file to fix the compilation
# by adding a missing "#include <iostream>"
RUN powershell.exe -ExecutionPolicy RemoteSigned `
"$fileName = 'C:/usd/pxr/imaging/hgi/attachmentDesc.h'; `
Set-Content $fileName -Value ((Get-Content $fileName) -replace '#include <vector>', $(echo '$&'`n'#include <iostream>'))"
# Download Maya-USD
RUN powershell.exe -ExecutionPolicy RemoteSigned `
git clone --depth 1 https://github.com/Autodesk/maya-usd C:/maya-usd
#######################################################
FROM base as prebuild
WORKDIR /build
ENTRYPOINT [ "C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&" ]
CMD [ "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass" ]