From a1f2ce637fd237cc5b7e55e62425e6a2872999f9 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Sep 2020 17:51:20 -0700 Subject: [PATCH] Docker build fixes --- .dockerignore | 3 +- Dockerfile | 197 ++++++++++++++++++------------ build.py | 6 +- cycles | 2 +- dependencies/OpenSubdiv/config.py | 2 + 5 files changed, 128 insertions(+), 82 deletions(-) diff --git a/.dockerignore b/.dockerignore index ff99b03..ebbf63f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,5 @@ * # And then explicitly include just what we want !build.py -!NVIDIA-OptiX-SDK-7.0.0-linux64.sh \ No newline at end of file +!NVIDIA-OptiX-SDK-7.0.0-linux64.sh +!NVIDIA-OptiX-SDK-7.1.0-linux64-x86_64.sh \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 80f300a..2a6d826 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,84 +2,127 @@ # production, and meets the glibc requirements of VFXPlatform 2018 # (2.17 or lower). -FROM centos:7 - -# Make GCC 6.3.1 the default compiler, as per VFXPlatform 2018 - -RUN yum install -y centos-release-scl -RUN yum install -y devtoolset-6 - -# Install CMake, SCons, and other miscellaneous build tools. -# We install SCons via `pip install --egg` rather than by -# `yum install` because this prevents a Cortex build failure -# caused by SCons picking up the wrong Python version and being -# unable to find its own modules. - -RUN yum install -y epel-release - -RUN yum install -y cmake3 -RUN ln -s /usr/bin/cmake3 /usr/bin/cmake - -RUN yum install -y python2-pip.noarch -RUN pip install --egg scons - -RUN yum install -y patch -RUN yum install -y doxygen - -# Install boost dependencies (needed by boost::iostreams) - -RUN yum install -y bzip2-devel - -# Install JPEG dependencies - -RUN yum install -y nasm - -# Install PNG dependencies - -RUN yum install -y zlib-devel - -# Install GLEW dependencies - -RUN yum install -y libX11-devel -RUN yum install -y mesa-libGL-devel -RUN yum install -y mesa-libGLU-devel -RUN yum install -y libXmu-devel -RUN yum install -y libXi-devel - -# Install OSL dependencies - -RUN yum install -y flex -RUN yum install -y bison - -# Install Qt dependencies - -RUN yum install -y xkeyboard-config.noarch -RUN yum install -y fontconfig-devel.x86_64 - +FROM centos:7.6.1810 + +# As we don't want to inadvertently grab newer versions of our yum-installed +# packages, we use yum-versionlock to keep them pinned. We track the list of +# image packages here, then compare after our install steps to see what was +# added, and only lock those. This saves us storing redundant entires for +# packages installed in the base image. + +# To unlock versions, just make sure yum-versionlock.list is empty in the repo +#COPY versionlock.sh ./ +#COPY yum-versionlock.list /etc/yum/pluginconf.d/versionlock.list + +#RUN yum install -y yum-versionlock && \ +# ./versionlock.sh list-installed /tmp/packages && \ +# +# +# NOTE: If you add a new yum package here, make sure you update the version +# lock files as follows and commit the changes to yum-versionlock.list: +# +# ./build-docker.py --update-package-versions --new-only +# +# We have to install scl as a separate yum command for some reason +# otherwise we get `scl not found` errors... +# +RUN yum install -y centos-release-scl && \ + sed -i 's/7/7.6.1810/g; s|^#\s*\(baseurl=http://\)mirror|\1vault|g; /mirrorlist/d' /etc/yum.repos.d/CentOS-SCLo-*.repo && \ + yum install -y devtoolset-6 && \ +# +# Install CMake, SCons, and other miscellaneous build tools. +# We install SCons via `pip install --egg` rather than by +# `yum install` because this prevents a Cortex build failure +# caused by SCons picking up the wrong Python version and being +# unable to find its own modules. +# + yum install -y epel-release && \ +# + yum install -y cmake3 && \ + ln -s /usr/bin/cmake3 /usr/bin/cmake && \ +# + yum install -y python2-pip.noarch && \ + pip install --egg scons==3.0.5 && \ +# + yum install -y \ + git \ + patch \ + doxygen && \ +# +# Install boost dependencies (needed by boost::iostreams) +# + yum install -y bzip2-devel && \ +# +# Install JPEG dependencies +# + yum install -y nasm && \ +# +# Install PNG dependencies && \ +# + yum install -y zlib-devel && \ +# +# Install GLEW dependencies +# + yum install -y \ + libX11-devel \ + mesa-libGL-devel \ + mesa-libGLU-devel \ + libXmu-devel \ + libXi-devel && \ +# +# Install OSL dependencies +# + yum install -y \ + flex \ + bison && \ +# +# Install Qt dependencies +# + yum install -y \ + xkeyboard-config.noarch \ + fontconfig-devel.x86_64 && \ +# +# Install Appleseed dependencies +# + yum install -y \ + lz4 lz4-devel +# # Install packages needed to generate the -# Gaffer documentation. Note that we are -# limited to Sphinx 1.4 because recommonmark -# is incompatible with later versions. And -# we are limited to docutils 0.12 because -# Sphinx 1.4 is incompatible with later -# versions. - -RUN yum install -y xorg-x11-server-Xvfb -RUN yum install -y mesa-dri-drivers.x86_64 -RUN yum install -y metacity -RUN yum install -y gnome-themes-standard - -RUN pip install sphinx==1.4 sphinx_rtd_theme recommonmark -RUN pip install docutils==0.12 - -RUN yum install -y inkscape - -RUN yum install -y wget - +# Gaffer documentation. + +#RUN yum install -y \ +# xorg-x11-server-Xvfb \ +# mesa-dri-drivers.x86_64 \ +# metacity \ +# gnome-themes-standard && \ +# Note: When updating these, also update gaffer/config/azure/build.yaml +# pip install \ +# sphinx==1.8.0 \ +# sphinx_rtd_theme==0.4.3 \ +# recommonmark==0.5.0 \ +# docutils==0.12 && \ +# +# yum install -y inkscape + +# Now we've installed all our packages, update yum-versionlock for all the +# new packages so we can copy the versionlock.list out of the container when we +# want to update the build env. +# If there were already locks in the list from the source checkout then the +# correct version will already be installed and we just ignore this... +# ./versionlock.sh lock-new /tmp/packages + +RUN yum install -y wget && \ +# +# # CUDA 11.0 - -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 \ - && rpm -i cuda.rpm && yum install -y cuda && rm cuda.rpm +# + 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 \ + && rpm -i cuda.rpm && yum install -y cuda && rm cuda.rpm && \ +# +# ISPC 1.14 +# + wget -O ispc.tar.gz https://github.com/ispc/ispc/releases/download/v1.14.1/ispc-v1.14.1-linux.tar.gz -- \ + && mkdir /ispc && tar xf ispc.tar.gz -C /ispc --strip-components=1 && mv /ispc/bin/ispc /usr/bin/ispc && rm -rf /ispc # OptiX 7.1.0 @@ -91,4 +134,4 @@ RUN mkdir /optix && ./NVIDIA-OptiX-SDK-7.1.0-linux64-x86_64.sh --skip-license -- COPY build.py ./ -ENTRYPOINT [ "scl", "enable", "devtoolset-6", "--", "bash" ] \ No newline at end of file +ENTRYPOINT [ "scl", "enable", "devtoolset-6", "--", "bash" ] diff --git a/build.py b/build.py index 67cb17b..0a0655f 100755 --- a/build.py +++ b/build.py @@ -60,7 +60,7 @@ parser.add_argument( "--gafferVersion", - default = "0.57.4.0", + default = "0.58.1.0", help = "The version of Gaffer to build against. " ) @@ -334,7 +334,6 @@ def releaseId() : "include/*", "lib/*.cubin", "lib/*.ptx", - "lib/libosdCPU*", "lib/libGafferCycles*", "license/*", "python/*", @@ -350,7 +349,8 @@ def releaseId() : "./build/build.py --project Gflags --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && " "./build/build.py --project Glog --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && " "./build/build.py --project Embree --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && " - "./build/build.py --project OpenSubdiv --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx}".format( + "./build/build.py --project OpenSubdiv --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx} && " + "./build/build.py --project OpenImageDenoise --gafferRoot {gafferRoot} --buildDir {gafferCyclesRoot}/install/{platform}_{buildType} --forceCxxCompiler {cxx}".format( gafferCyclesRoot=gafferCyclesDirName, gafferRoot=gafferDirName, **formatVariables ), ] diff --git a/cycles b/cycles index 0c0c0a3..b10f955 160000 --- a/cycles +++ b/cycles @@ -1 +1 @@ -Subproject commit 0c0c0a3d193f9d223346446816ab753df5a2ae7b +Subproject commit b10f9555f217164d9b6fa58ac88eac5b58545657 diff --git a/dependencies/OpenSubdiv/config.py b/dependencies/OpenSubdiv/config.py index 6c14ca0..fabd2c9 100644 --- a/dependencies/OpenSubdiv/config.py +++ b/dependencies/OpenSubdiv/config.py @@ -34,6 +34,8 @@ " -D NO_GLFW=1" " -D NO_GLFW_X11=1" " -D GLEW_LOCATION={gafferRoot}" + " -D BUILD_SHARED_LIBS=0" + " -D NO_TBB=0" " ..", "cd gafferBuild && cmake --build . --config {cmakeBuildType} --target install",