Skip to content

Commit a1f2ce6

Browse files
committed
Docker build fixes
1 parent a132a00 commit a1f2ce6

File tree

5 files changed

+128
-82
lines changed

5 files changed

+128
-82
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
*
33
# And then explicitly include just what we want
44
!build.py
5-
!NVIDIA-OptiX-SDK-7.0.0-linux64.sh
5+
!NVIDIA-OptiX-SDK-7.0.0-linux64.sh
6+
!NVIDIA-OptiX-SDK-7.1.0-linux64-x86_64.sh

Dockerfile

Lines changed: 120 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,84 +2,127 @@
22
# production, and meets the glibc requirements of VFXPlatform 2018
33
# (2.17 or lower).
44

5-
FROM centos:7
6-
7-
# Make GCC 6.3.1 the default compiler, as per VFXPlatform 2018
8-
9-
RUN yum install -y centos-release-scl
10-
RUN yum install -y devtoolset-6
11-
12-
# Install CMake, SCons, and other miscellaneous build tools.
13-
# We install SCons via `pip install --egg` rather than by
14-
# `yum install` because this prevents a Cortex build failure
15-
# caused by SCons picking up the wrong Python version and being
16-
# unable to find its own modules.
17-
18-
RUN yum install -y epel-release
19-
20-
RUN yum install -y cmake3
21-
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
22-
23-
RUN yum install -y python2-pip.noarch
24-
RUN pip install --egg scons
25-
26-
RUN yum install -y patch
27-
RUN yum install -y doxygen
28-
29-
# Install boost dependencies (needed by boost::iostreams)
30-
31-
RUN yum install -y bzip2-devel
32-
33-
# Install JPEG dependencies
34-
35-
RUN yum install -y nasm
36-
37-
# Install PNG dependencies
38-
39-
RUN yum install -y zlib-devel
40-
41-
# Install GLEW dependencies
42-
43-
RUN yum install -y libX11-devel
44-
RUN yum install -y mesa-libGL-devel
45-
RUN yum install -y mesa-libGLU-devel
46-
RUN yum install -y libXmu-devel
47-
RUN yum install -y libXi-devel
48-
49-
# Install OSL dependencies
50-
51-
RUN yum install -y flex
52-
RUN yum install -y bison
53-
54-
# Install Qt dependencies
55-
56-
RUN yum install -y xkeyboard-config.noarch
57-
RUN yum install -y fontconfig-devel.x86_64
58-
5+
FROM centos:7.6.1810
6+
7+
# As we don't want to inadvertently grab newer versions of our yum-installed
8+
# packages, we use yum-versionlock to keep them pinned. We track the list of
9+
# image packages here, then compare after our install steps to see what was
10+
# added, and only lock those. This saves us storing redundant entires for
11+
# packages installed in the base image.
12+
13+
# To unlock versions, just make sure yum-versionlock.list is empty in the repo
14+
#COPY versionlock.sh ./
15+
#COPY yum-versionlock.list /etc/yum/pluginconf.d/versionlock.list
16+
17+
#RUN yum install -y yum-versionlock && \
18+
# ./versionlock.sh list-installed /tmp/packages && \
19+
#
20+
#
21+
# NOTE: If you add a new yum package here, make sure you update the version
22+
# lock files as follows and commit the changes to yum-versionlock.list:
23+
#
24+
# ./build-docker.py --update-package-versions --new-only
25+
#
26+
# We have to install scl as a separate yum command for some reason
27+
# otherwise we get `scl not found` errors...
28+
#
29+
RUN yum install -y centos-release-scl && \
30+
sed -i 's/7/7.6.1810/g; s|^#\s*\(baseurl=http://\)mirror|\1vault|g; /mirrorlist/d' /etc/yum.repos.d/CentOS-SCLo-*.repo && \
31+
yum install -y devtoolset-6 && \
32+
#
33+
# Install CMake, SCons, and other miscellaneous build tools.
34+
# We install SCons via `pip install --egg` rather than by
35+
# `yum install` because this prevents a Cortex build failure
36+
# caused by SCons picking up the wrong Python version and being
37+
# unable to find its own modules.
38+
#
39+
yum install -y epel-release && \
40+
#
41+
yum install -y cmake3 && \
42+
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
43+
#
44+
yum install -y python2-pip.noarch && \
45+
pip install --egg scons==3.0.5 && \
46+
#
47+
yum install -y \
48+
git \
49+
patch \
50+
doxygen && \
51+
#
52+
# Install boost dependencies (needed by boost::iostreams)
53+
#
54+
yum install -y bzip2-devel && \
55+
#
56+
# Install JPEG dependencies
57+
#
58+
yum install -y nasm && \
59+
#
60+
# Install PNG dependencies && \
61+
#
62+
yum install -y zlib-devel && \
63+
#
64+
# Install GLEW dependencies
65+
#
66+
yum install -y \
67+
libX11-devel \
68+
mesa-libGL-devel \
69+
mesa-libGLU-devel \
70+
libXmu-devel \
71+
libXi-devel && \
72+
#
73+
# Install OSL dependencies
74+
#
75+
yum install -y \
76+
flex \
77+
bison && \
78+
#
79+
# Install Qt dependencies
80+
#
81+
yum install -y \
82+
xkeyboard-config.noarch \
83+
fontconfig-devel.x86_64 && \
84+
#
85+
# Install Appleseed dependencies
86+
#
87+
yum install -y \
88+
lz4 lz4-devel
89+
#
5990
# Install packages needed to generate the
60-
# Gaffer documentation. Note that we are
61-
# limited to Sphinx 1.4 because recommonmark
62-
# is incompatible with later versions. And
63-
# we are limited to docutils 0.12 because
64-
# Sphinx 1.4 is incompatible with later
65-
# versions.
66-
67-
RUN yum install -y xorg-x11-server-Xvfb
68-
RUN yum install -y mesa-dri-drivers.x86_64
69-
RUN yum install -y metacity
70-
RUN yum install -y gnome-themes-standard
71-
72-
RUN pip install sphinx==1.4 sphinx_rtd_theme recommonmark
73-
RUN pip install docutils==0.12
74-
75-
RUN yum install -y inkscape
76-
77-
RUN yum install -y wget
78-
91+
# Gaffer documentation.
92+
93+
#RUN yum install -y \
94+
# xorg-x11-server-Xvfb \
95+
# mesa-dri-drivers.x86_64 \
96+
# metacity \
97+
# gnome-themes-standard && \
98+
# Note: When updating these, also update gaffer/config/azure/build.yaml
99+
# pip install \
100+
# sphinx==1.8.0 \
101+
# sphinx_rtd_theme==0.4.3 \
102+
# recommonmark==0.5.0 \
103+
# docutils==0.12 && \
104+
#
105+
# yum install -y inkscape
106+
107+
# Now we've installed all our packages, update yum-versionlock for all the
108+
# new packages so we can copy the versionlock.list out of the container when we
109+
# want to update the build env.
110+
# If there were already locks in the list from the source checkout then the
111+
# correct version will already be installed and we just ignore this...
112+
# ./versionlock.sh lock-new /tmp/packages
113+
114+
RUN yum install -y wget && \
115+
#
116+
#
79117
# CUDA 11.0
80-
81-
RUN wget -O cuda.rpm https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-rhel7-11-0-local-11.0.3_450.51.06-1.x86_64.rpm --progress=dot:mega \
82-
&& rpm -i cuda.rpm && yum install -y cuda && rm cuda.rpm
118+
#
119+
wget -O cuda.rpm https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-rhel7-11-0-local-11.0.3_450.51.06-1.x86_64.rpm --progress=dot:mega \
120+
&& rpm -i cuda.rpm && yum install -y cuda && rm cuda.rpm && \
121+
#
122+
# ISPC 1.14
123+
#
124+
wget -O ispc.tar.gz https://github.com/ispc/ispc/releases/download/v1.14.1/ispc-v1.14.1-linux.tar.gz -- \
125+
&& mkdir /ispc && tar xf ispc.tar.gz -C /ispc --strip-components=1 && mv /ispc/bin/ispc /usr/bin/ispc && rm -rf /ispc
83126

84127
# OptiX 7.1.0
85128

@@ -91,4 +134,4 @@ RUN mkdir /optix && ./NVIDIA-OptiX-SDK-7.1.0-linux64-x86_64.sh --skip-license --
91134

92135
COPY build.py ./
93136

94-
ENTRYPOINT [ "scl", "enable", "devtoolset-6", "--", "bash" ]
137+
ENTRYPOINT [ "scl", "enable", "devtoolset-6", "--", "bash" ]

build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
parser.add_argument(
6262
"--gafferVersion",
63-
default = "0.57.4.0",
63+
default = "0.58.1.0",
6464
help = "The version of Gaffer to build against. "
6565
)
6666

@@ -334,7 +334,6 @@ def releaseId() :
334334
"include/*",
335335
"lib/*.cubin",
336336
"lib/*.ptx",
337-
"lib/libosdCPU*",
338337
"lib/libGafferCycles*",
339338
"license/*",
340339
"python/*",
@@ -350,7 +349,8 @@ def releaseId() :
350349
"./build/build.py --project Gflags --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && "
351350
"./build/build.py --project Glog --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && "
352351
"./build/build.py --project Embree --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && "
353-
"./build/build.py --project OpenSubdiv --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx}".format(
352+
"./build/build.py --project OpenSubdiv --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && "
353+
"./build/build.py --project OpenImageDenoise --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx}".format(
354354
gafferCyclesRoot=gafferCyclesDirName, gafferRoot=gafferDirName, **formatVariables ),
355355
]
356356

cycles

dependencies/OpenSubdiv/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
" -D NO_GLFW=1"
3535
" -D NO_GLFW_X11=1"
3636
" -D GLEW_LOCATION={gafferRoot}"
37+
" -D BUILD_SHARED_LIBS=0"
38+
" -D NO_TBB=0"
3739
" ..",
3840
"cd gafferBuild && cmake --build . --config {cmakeBuildType} --target install",
3941

0 commit comments

Comments
 (0)