diff --git a/.gitignore b/.gitignore index 1e04dc1..650145e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ linux/cert/*.pem .pydevproject .cproject .settings/ +.vscode/ downloads/* Testing diff --git a/README.md b/README.md index d0d3527..b830f3e 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,61 @@ # USD in a Docker Container -In this repository you will find a set of docker build scripts which will -download all the Open Source packages required to build Pixar's -Universal Scene Description, as well as USD itself. +This repository contains build scripts for minimal linux docker container with USD. -If you are running a linux supported by nvidia-docker you can also run usdview -interactively using the run.sh script, including CUDA acceleration for OpenSubdiv. -Otherwise you can still use most tools such as usdcat. +## usd-lite -The image tagged "usd-docker/vfx:centos7-usd-latest" will be very similar to a VFX Platform 2016 -except for the Qt version still being at 4.8 as USD doesn't support Qt-5 and PySide-2 just yet. - -The image tagged "usd-docker/usd:centos7-usd-latest" is built from the vfx one and adds -USD. - -We will not release pre-built images on Docker Hub for now as they are big and -will contain dozens of OSS packages with very different licenses. +### To run: +```bash +docker run --rm -v $HOME:$HOME dockerusd/usd-lite:20.08-centos7 usdtree $HOME/Downloads/Kitchen_set/Kitchen_set.usd + +# -> +#/ +# `--Kitchen_set [def Xform] (kind = assembly) +# |--Arch_grp [def Xform] (kind = group) +# | `--Kitchen_1 [def] +# `--Props_grp [def Xform] (kind = group) +#... +``` +It can be used as a provider for `usdcat` and `usdresolve` for the `AL_usd_vscode_extension` VSCode extension, just use these settings: +``` +# usdcat which exposes the whole $HOME folder to the docker container +docker run --rm -v ${HOME}:${HOME} usd-docker/usd-lite:20.08-centos7 usdcat --usdFormat usda "{inputPath}" +# usdresolve which exposes the whole $HOME folder to the docker container +docker run --rm -v ${HOME}:${HOME} usd-docker/usd-lite:20.08-centos7 usdresolve --anchorPath "{anchorPath}" "{inputPath}" +``` -To build locally: +### To build locally: ```bash cd linux -./build-centos7.sh +./build-centos7-lite.sh ``` -To run usdview once built: +## usd-jupyter +### To run: +First place the USD files you wish to inspect in a folder called `work` in your home directory. + ```bash -wget https://developer.apple.com/arkit/gallery/models/retrotv/retrotv.usdz --output-document=../data/retrotv.usdz -./run-centos7.sh usdview /data/retrotv.usdz +docker run -it --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v ~/work:/home/jovyan/work dockerusd/usd-jupyter +# Then click on the printed url in the console to open the Jupyter notebook in your browser ``` +See this example Jupyter notebook file: [USDBasics.ipynb](./USDBasics.ipynb) which can open the Pixar Kitchen Set USD file and +inspect the content interactively. To try this download the [Pixar Kitchen Set](http://graphics.pixar.com/usd/downloads.html) in the `work` folder, copy the `USDBasics.ipynb` in the folder alongside the `Kitchen_set.usd` file and open that notebook. -To build with maya +### To build locally: ```bash cd linux -./build-centos7_maya.sh 2018 +./build-jupyter.sh ``` +# Goals +Most of the previously available docker images are now available in the newer and more regularly maintained [ASWF docker images](https://github.com/AcademySoftwareFoundation/aswf-docker). -## Roadmap -At this stage this repository is used to test our AL_USDMaya plugin in a Animal Logic independent way and we are sharing it -because it might help others when building USD. - -This repository can also help evaluate USD as it makes all USD tools available -within the docker container, these include usdview (with full GL and CUDA acceleration) -and usdcat with Alembic support. - -## Goals -The main goal of this work is to ensure correct builds and automated tests of our AL_USDMaya plugin, as well as being -a technology exploration, it is good to see the progress done by docker and nvidia on supporting GPU acceleration in -containers. - -One potential future goal could be to provide standard ways to build VFX Platform packages. - -## Build requirements -For easiest build you need a recent version of linux with Docker-1.9 and -nvidia-docker. -If you are on a platform not supported by docker-1.9 (such as CentOS-6) you can -still build the images but running them is a lot trickier as nvidia-docker is -not available and you have to manually create the volume containing the NVidia driver. - -The builds have been tested on CentOS-6 and Ubuntu-14-10. - -### Maya images -We provide a few Dockerfiles that rely on having a maya devkit tarball available. Unfortunately the recent devkit are not accessible without Autodesk accounts which means we cannot provide automatic downloads for these. +This repository now contains minimal images that can help running USD inside VSCode or in Jupyter notebooks. -We have tried to simplify the process by allowing you to download the tarballs and place them in a `downloads` folder and they will be fed to the build via a temporary python http server... this is not for the feint of heart. We would like to improve this in the future by "configuring" the Dockerfiles for specific targets depending on which builds are required. +# Build requirements +For easiest build you need a recent version of linux with Docker-1.9, navigate to the "linux" folder and run the `build-XYZ.sh` scripts. -## Credits: +# Credits: * For USD: http://openusd.org * For Docker: https://www.docker.com/ -* For the GPU-enabled docker base images: https://github.com/NVIDIA/nvidia-docker -* For the VFX Platform docker build inspiration: https://github.com/EfestoLab/docker-buildGaffer +* For ASWF docker packages: https://github.com/AcademySoftwareFoundation/aswf-docker diff --git a/USDBasics.ipynb b/USDBasics.ipynb new file mode 100644 index 0000000..b91b10d --- /dev/null +++ b/USDBasics.ipynb @@ -0,0 +1,148 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# USD Basics\n", + "\n", + "## Print USD Version" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "USD v0.20.8\n" + ] + } + ], + "source": [ + "from pxr import Usd\n", + "print(\"USD v\" + \".\".join(map(str, Usd.GetVersion())))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Open the Kitchen Set USD file" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stage root layer: /home/jovyan/work/Kitchen_set.usd\n" + ] + } + ], + "source": [ + "stage = Usd.Stage.Open(\"Kitchen_set.usd\")\n", + "print(f\"Stage root layer: {stage.GetRootLayer().realPath}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Iterate Prims" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "prim / []\n", + "prim /Kitchen_set [Xform]\n", + "prim /Kitchen_set/Arch_grp [Xform]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1 [Xform]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1/Geom [Xform]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1/Geom/Cabinets [Xform]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1/Geom/Cabinets/Body [Xform]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1/Geom/Cabinets/Body/pCube251 [Mesh]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1/Geom/Cabinets/Body/pCube277 [Mesh]\n", + "prim /Kitchen_set/Arch_grp/Kitchen_1/Geom/Cabinets/Body/pCube278 [Mesh]\n", + "..................................................................................................................................................................................................................................................................................\n", + "The kitchen contains 2742 prims!\n" + ] + } + ], + "source": [ + "for numPrims, prim in enumerate(Usd.PrimRange(stage.GetPseudoRoot())):\n", + " if numPrims < 10: # Only print the first 10 prims\n", + " print(f\"prim {prim.GetPath()} [{prim.GetTypeName()}]\")\n", + " elif numPrims % 10 == 1: # Otherwise print a dot for every 10 prims\n", + " print(\".\", end = '')\n", + "print(\"\")\n", + "print(f\"The kitchen contains {numPrims} prims!\")" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The kitchen contains 203832 points!\n" + ] + } + ], + "source": [ + "from pxr import UsdGeom\n", + "numPoints = 0\n", + "for prim in Usd.PrimRange(stage.GetPseudoRoot()):\n", + " if prim.IsA(UsdGeom.PointBased):\n", + " pb = UsdGeom.PointBased(prim)\n", + " numPoints += len(mesh.GetPointsAttr().Get())\n", + "print(f\"The kitchen contains {numPoints} points!\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 1336086..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Docker image -# Build a Docker image to deploy, run, or push to a container registry. -# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/docker - -pool: - vmImage: 'Ubuntu 16.04' - -steps: -- script: cd linux && ./build-centos7.sh - displayName: 'docker build' diff --git a/linux/build-centos7-lite.sh b/linux/build-centos7-lite.sh deleted file mode 100755 index 3b5677e..0000000 --- a/linux/build-centos7-lite.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - - -set -e - -export DOWNLOADS_DIR="`pwd`/../downloads" -export USD_VERSION="18.11" -export CUDA_VERSION="9.0" - -echo "Downloads folder: ${DOWNLOADS_DIR}" -echo "Copy local root certificates for corporate networks" -[ -e /etc/pki/ca-trust/source/anchors ] && cp -u /etc/pki/ca-trust/source/anchors/* cert/ - -export LOCAL_IP=`hostname -I|cut -d' ' -f1` - -scripts/download_vfx.sh -scripts/download_usd.sh - -# Start a local server to serve files needed during the build. -cd ${DOWNLOADS_DIR} && python -m SimpleHTTPServer && cd - & - -httpServerPID=$(ps -ef | grep SimpleHTTPServer | grep -v grep | awk '{print $2}') -function finish { - kill $httpServerPID -} -trap finish EXIT - -echo "Build VFX packages" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - -t "usd-docker/vfx-lite:2018-centos7" \ - -f centos7/vfx-lite-2018/Dockerfile . -docker tag "usd-docker/vfx-lite:2018-centos7" "usd-docker/vfx-lite:latest-centos7" - -echo "Build USD v${USD_VERSION}" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - --build-arg usd_version=${USD_VERSION} \ - -t "usd-docker/usd-lite:${USD_VERSION}-centos7" \ - -f centos7/usd-lite/Dockerfile . -docker tag "usd-docker/usd-lite:${USD_VERSION}-centos7" "usd-docker/usd-lite:${USD_VERSION}-centos7" -docker tag "usd-docker/usd-lite:${USD_VERSION}-centos7" "usd-docker/usd-lite:latest-centos7" diff --git a/linux/build-centos7.sh b/linux/build-centos7.sh deleted file mode 100755 index 89572ee..0000000 --- a/linux/build-centos7.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - - -set -e - -export DOWNLOADS_DIR="`pwd`/../downloads" -export USD_VERSION="18.11" -export CUDA_VERSION="9.0" - -echo "Downloads folder: ${DOWNLOADS_DIR}" -echo "Copy local root certificates for corporate networks" -[ -e /etc/pki/ca-trust/source/anchors ] && cp -u /etc/pki/ca-trust/source/anchors/* cert/ - -export LOCAL_IP=`hostname -I|cut -d' ' -f1` - -scripts/download_vfx.sh -scripts/download_usd.sh - -# Start a local server to serve files needed during the build. -cd ${DOWNLOADS_DIR} && python -m SimpleHTTPServer && cd - & - -httpServerPID=$(ps -ef | grep SimpleHTTPServer | grep -v grep | awk '{print $2}') -function finish { - kill $httpServerPID -} -trap finish EXIT - -echo "Build base: base centos packages and gcc" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - --build-arg cuda_version=${CUDA_VERSION} \ - -t "usd-docker/base:1-centos7" -f centos7/base/Dockerfile . -docker tag "usd-docker/base:1-centos7" "usd-docker/base:latest-centos7" - -echo "Build VFX packages" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - -t "usd-docker/vfx:1-centos7" \ - -f centos7/vfx/Dockerfile . -docker tag "usd-docker/vfx:1-centos7" "usd-docker/vfx:latest-centos7" - -echo "Build USD v${USD_VERSION}" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - --build-arg usd_version=${USD_VERSION} \ - -t "usd-docker/usd:${USD_VERSION}-centos7" \ - -f centos7/usd/Dockerfile . -docker tag "usd-docker/usd:${USD_VERSION}-centos7" "usd-docker/usd:${USD_VERSION}-centos7" -docker tag "usd-docker/usd:${USD_VERSION}-centos7" "usd-docker/usd:latest-centos7" diff --git a/linux/build-centos7_maya.sh b/linux/build-centos7_maya.sh deleted file mode 100755 index ee24136..0000000 --- a/linux/build-centos7_maya.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - - -set -e - -if [ -z "$1" ]; then - echo "Please pass the Maya Major version to use as the first and only argument (e.g. 2018)" - exit 1 -fi - -export DOWNLOADS_DIR="`pwd`/../downloads" -export USD_VERSION="19.01" -export CUDA_VERSION="9.0" -export MAYA_VERSION="$1" - -echo "Downloads folder: ${DOWNLOADS_DIR}" -echo "Copy local root certificates for corporate networks" -[ -e /etc/pki/ca-trust/source/anchors ] && cp -u /etc/pki/ca-trust/source/anchors/* cert/ - -export LOCAL_IP=`hostname -I|cut -d' ' -f1` - -scripts/download_vfx.sh -scripts/download_maya.sh -scripts/download_usd.sh - -# Start a local server to serve files needed during the build. -cd ${DOWNLOADS_DIR} && python -m SimpleHTTPServer && cd - & - -httpServerPID=$(ps -ef | grep SimpleHTTPServer | grep -v grep | awk '{print $2}') -function finish { - kill $httpServerPID -} -trap finish EXIT - -echo "Build base: base centos packages and gcc" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - --build-arg cuda_version=${CUDA_VERSION} \ - -t "usd-docker/base:1-centos7" -f centos7/base/Dockerfile . -docker tag "usd-docker/base:1-centos7" "usd-docker/base:latest-centos7" - -echo "Build VFX packages" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - -t "usd-docker/vfx:1-centos7" \ - -f centos7/vfx/Dockerfile . -docker tag "usd-docker/vfx:1-centos7" "usd-docker/vfx:latest-centos7" - -echo "Build Maya v${MAYA_VERSION}" -docker build --build-arg current_host_ip_address=$LOCAL_IP \ - --build-arg maya_version=${MAYA_VERSION} \ - -t "usd-docker/maya${MAYA_VERSION}:1-centos7" \ - -f centos7/maya/Dockerfile . -docker tag "usd-docker/maya${MAYA_VERSION}:1-centos7" "usd-docker/maya${MAYA_VERSION}:latest-centos7" - -echo "Build USD v${USD_VERSION}" -docker build --build-arg current_host_ip_address=${LOCAL_IP} \ - --build-arg maya_version=${MAYA_VERSION} \ - --build-arg usd_version=${USD_VERSION} \ - -t "usd-docker/maya${MAYA_VERSION}-usd:${USD_VERSION}-centos7" \ - -f centos7/usd/Dockerfile_maya . -docker tag "usd-docker/maya${MAYA_VERSION}-usd:${USD_VERSION}-centos7" "usd-docker/maya${MAYA_VERSION}-usd:latest-centos7" -docker tag "usd-docker/maya${MAYA_VERSION}-usd:${USD_VERSION}-centos7" "usd-docker/maya-usd:latest-centos7" diff --git a/linux/build-usd-jupyter.sh b/linux/build-usd-jupyter.sh new file mode 100755 index 0000000..cff43c6 --- /dev/null +++ b/linux/build-usd-jupyter.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -e + +export DOWNLOADS_DIR="`pwd`/../downloads" +export USD_VERSION="20.08" +export CUDA_VERSION="10.2" + +echo "Downloads folder: ${DOWNLOADS_DIR}" + +export LOCAL_IP=`hostname -I|cut -d' ' -f1` + +scripts/download_usd.sh + +# Start a local server to serve files needed during the build. +cd ${DOWNLOADS_DIR} && python3 -m http.server && cd - & + +httpServerPID=$(ps -ef | grep http.server | grep -v grep | awk '{print $2}') +function finish { + kill $httpServerPID +} +trap finish EXIT + +echo "Build USD v${USD_VERSION}" +docker build --build-arg current_host_ip_address=${LOCAL_IP} \ + --build-arg usd_version=${USD_VERSION} \ + -t "dockerusd/usd-jupyter:${USD_VERSION}-centos7" \ + -f usd-jupyter/Dockerfile . +docker tag "dockerusd/usd-jupyter:${USD_VERSION}-centos7" "dockerusd/usd-jupyter:${USD_VERSION}-centos7" +docker tag "dockerusd/usd-jupyter:${USD_VERSION}-centos7" "dockerusd/usd-jupyter:latest-centos7" +docker tag "dockerusd/usd-jupyter:${USD_VERSION}-centos7" "dockerusd/usd-jupyter:latest" diff --git a/linux/build-usd-lite.sh b/linux/build-usd-lite.sh new file mode 100755 index 0000000..4653994 --- /dev/null +++ b/linux/build-usd-lite.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Copyright (C) Animal Logic Pty Ltd. All rights reserved. + + +set -e + +export DOWNLOADS_DIR="`pwd`/../downloads" +export USD_VERSION="20.08" +export CUDA_VERSION="10.2" +export CI_COMMON_VERSION=1 +export VFXPLATFORM_VERSION=2020 + +echo "Downloads folder: ${DOWNLOADS_DIR}" +echo "Copy local root certificates for corporate networks" +[ -e /etc/pki/ca-trust/source/anchors ] && cp -u /etc/pki/ca-trust/source/anchors/* cert/ + +export LOCAL_IP=`hostname -I|cut -d' ' -f1` + +scripts/download_usd.sh + +# Start a local server to serve files needed during the build. +cd ${DOWNLOADS_DIR} && python3 -m http.server && cd - & + +httpServerPID=$(ps -ef | grep http.server | grep -v grep | awk '{print $2}') +function finish { + kill $httpServerPID +} +trap finish EXIT + +echo "Build USD v${USD_VERSION}" +docker build --build-arg current_host_ip_address=${LOCAL_IP} \ + --build-arg usd_version=${USD_VERSION} \ + --build-arg CI_COMMON_VERSION=${CI_COMMON_VERSION} \ + --build-arg VFXPLATFORM_VERSION=${VFXPLATFORM_VERSION} \ + -t "dockerusd/usd-lite:${USD_VERSION}-centos7" \ + -f usd-lite/Dockerfile . +docker tag "dockerusd/usd-lite:${USD_VERSION}-centos7" "dockerusd/usd-lite:${USD_VERSION}-centos7" +docker tag "dockerusd/usd-lite:${USD_VERSION}-centos7" "dockerusd/usd-lite:latest-centos7" +docker tag "dockerusd/usd-lite:${USD_VERSION}-centos7" "dockerusd/usd-lite:latest" diff --git a/linux/centos7/base/Dockerfile b/linux/centos7/base/Dockerfile deleted file mode 100644 index 147ed08..0000000 --- a/linux/centos7/base/Dockerfile +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to build USD on VFX Platform 2016 -# Based on nvidia/cuda:devel-centos6 -ARG cuda_version=latest -FROM nvidia/cudagl:${cuda_version}-devel-centos7 - -LABEL maintainer="Aloys.Baillet - Animal Logic" - -ENV BUILD_PROCS 7 -ENV BUILD_DIR /opt/usd -ENV TMP_DIR /tmp/usd-build -ENV DOWNLOADS_DIR /tmp/usd-downloads - -ENV PATH $BUILD_DIR/bin:$PATH -ENV PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH -ENV LD_LIBRARY_PATH=$BUILD_DIR/lib64:$BUILD_DIR/lib:$LD_LIBRARY_PATH - -RUN yum -y groupinstall "Development Tools" -RUN yum install -y epel-release && sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo -RUN yum install -y \ - wget \ - openssl-devel \ - openssl \ - sqlite-devel \ - sqlite \ - glibc-devel.x86_64 \ - libicu-devel\ - libicu \ - wget \ - git \ - tar \ - cmake \ - bzip2 \ - bzip2-devel \ - glibc-devel.x86_64 \ - glibc-devel.i686 \ - zlib-devel.x86_64 \ - texinfo.x86_64 \ - libXext-devel \ - openssl-devel \ - libXext-devel \ - libXt-devel \ - libicu-devel \ - sqlite-devel \ - tk-devel \ - ncurses \ - ncurses-devel \ - freetype-devel.x86_64 \ - libxml2-devel.x86_64 \ - libxslt-devel.x86_64 \ - mesa-libGL-devel.x86_64 \ - libXrandr-devel.x86_64 \ - libXinerama-devel.x86_64 \ - libXcursor-devel.x86_64 \ - glut-devel \ - libXmu-devel \ - libXi-devel \ - pulseaudio-libs-devel.x86_64 \ - xorg-x11-fonts-Type1 \ - ca-certificates \ - python-devel \ - qt-devel \ - gstreamer-plugins-base \ - libXp \ - libXpm \ - gamin-devel \ - tcsh \ - libXp \ - libXpm \ - fam \ - libpng12 \ - libXcomposite \ - libjpeg \ - python-pip \ - qt-devel.x86_64 \ - python-pyside-devel.x86_64 \ - pyside-tools.x86_64 - -COPY cert/* /etc/pki/ca-trust/source/anchors/ - -RUN update-ca-trust force-enable && \ - update-ca-trust extract - -CMD bash diff --git a/linux/centos7/maya/Dockerfile b/linux/centos7/maya/Dockerfile deleted file mode 100644 index 41ebfba..0000000 --- a/linux/centos7/maya/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to install maya2018 -# Based on nvidia/base:centos7-usd-0.8 - -FROM usd-docker/vfx:latest-centos7 - -ARG current_host_ip_address -ARG maya_version - -LABEL maya.version="${maya_version}.0" maintainer="Animal Logic" - -ENV MAYA_LOCATION=$BUILD_DIR/maya${maya_version}DevKit -ENV HTTP_HOSTNAME=$current_host_ip_address -ENV MAYA_EXECUTABLE=$MAYA_LOCATION/bin/maya -ENV MAYA_MAJOR_VERSION="${maya_version}" - -COPY scripts/build_maya.sh scripts/download_maya.sh /tmp/ - -RUN /tmp/download_maya.sh && \ - /tmp/build_maya.sh diff --git a/linux/centos7/usd-lite/Dockerfile b/linux/centos7/usd-lite/Dockerfile deleted file mode 100644 index ccc9468..0000000 --- a/linux/centos7/usd-lite/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to build USD Maya -FROM usd-docker/vfx-lite:latest-centos7 as builder - -ARG current_host_ip_address -ARG usd_version - -LABEL pxr.usd.version="$usd_version" maintainer="Aloys.Baillet - Animal Logic" - -ENV USD_VERSION=$usd_version -ENV HTTP_HOSTNAME=$current_host_ip_address - -COPY scripts/download_usd.sh /tmp/ -RUN /tmp/download_usd.sh -RUN yum install -y python-jinja2 -RUN mkdir -p $TMP_DIR -RUN cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/USD-v${USD_VERSION}.tar.gz && \ - cd $TMP_DIR/USD-${USD_VERSION} && \ - mkdir build && \ - cd build && \ - cmake \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/usd/${USD_VERSION} \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR \ - -DPXR_BUILD_TESTS=OFF \ - -DTBB_ROOT_DIR=$BUILD_DIR \ - -DPXR_ENABLE_GL_SUPPORT=FALSE \ - -DPXR_ENABLE_PTEX_SUPPORT=FALSE \ - -DPXR_MALLOC_LIBRARY:path=$BUILD_DIR/lib/libjemalloc.so \ - -DPXR_BUILD_USD_IMAGING=FALSE \ - .. - -RUN cd $TMP_DIR/USD-${USD_VERSION}/build && \ - make -j 4 - -RUN cd $TMP_DIR/USD-${USD_VERSION}/build && \ - make install - - -ENV USD_INSTALL_ROOT=$BUILD_DIR/usd/${USD_VERSION} -ENV USD_CONFIG_FILE=$USD_INSTALL_ROOT/pxrConfig.cmake -ENV PATH=$PATH:$USD_INSTALL_ROOT/bin -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$USD_INSTALL_ROOT/lib -ENV PYTHONPATH=$PYTHONPATH:$USD_INSTALL_ROOT/lib/python - - -# RUNTIME IMAGE -FROM centos:7 -ARG usd_version - -RUN yum install -y --setopt=tsflags=nodocs centos-release-scl-rh &&\ - yum install -y --setopt=tsflags=nodocs devtoolset-7-runtime &&\ - yum clean all -y - -COPY --from=0 $BUILD_DIR $BUILD_DIR - -ENV USD_VERSION=$usd_version -ENV USD_INSTALL_ROOT=/opt/vfx/usd/${USD_VERSION} -ENV USD_CONFIG_FILE=$USD_INSTALL_ROOT/pxrConfig.cmake -ENV PATH=$PATH:$USD_INSTALL_ROOT/bin -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$USD_INSTALL_ROOT/lib -ENV PYTHONPATH=$PYTHONPATH:$USD_INSTALL_ROOT/lib/python -ENV LD_PRELOAD=/opt/vfx/lib/libjemalloc.so.2 diff --git a/linux/centos7/usd/Dockerfile b/linux/centos7/usd/Dockerfile deleted file mode 100644 index 06128df..0000000 --- a/linux/centos7/usd/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to build USD Maya -FROM usd-docker/vfx:latest-centos7 - -ARG current_host_ip_address -ARG usd_version - -LABEL pxr.usd.version="$usd_version" maintainer="Aloys.Baillet - Animal Logic" - -ENV USD_VERSION=$usd_version -ENV HTTP_HOSTNAME=$current_host_ip_address - -COPY scripts/download_usd.sh scripts/build_usd.sh /tmp/ -RUN /tmp/download_usd.sh && \ - /tmp/build_usd.sh - -ENV USD_INSTALL_ROOT=$BUILD_DIR/usd/${USD_VERSION} -ENV USD_CONFIG_FILE=$USD_INSTALL_ROOT/pxrConfig.cmake -ENV PATH=$PATH:$USD_INSTALL_ROOT/bin -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$USD_INSTALL_ROOT/lib -ENV PYTHONPATH=$PYTHONPATH:$USD_INSTALL_ROOT/lib/python diff --git a/linux/centos7/usd/Dockerfile_maya b/linux/centos7/usd/Dockerfile_maya deleted file mode 100644 index e210273..0000000 --- a/linux/centos7/usd/Dockerfile_maya +++ /dev/null @@ -1,24 +0,0 @@ -############################################################ -# Dockerfile to build USD Maya -ARG maya_version -FROM usd-docker/maya${maya_version}:latest-centos7 - -ARG usd_version -ARG maya_version -ARG current_host_ip_address - -LABEL pxr.usd.version="${usd_version}" maintainer="Aloys.Baillet - Animal Logic" - -ENV USD_VERSION="${usd_version}" -ENV MAYA_MAJOR_VERSION="${maya_version}" -ENV HTTP_HOSTNAME="${current_host_ip_address}" - -COPY scripts/download_usd.sh scripts/build_usd.sh /tmp/ -RUN /tmp/download_usd.sh && \ - /tmp/build_usd.sh - -ENV USD_INSTALL_ROOT=$BUILD_DIR/usd/${usd_version} -ENV USD_CONFIG_FILE=$USD_INSTALL_ROOT/pxrConfig.cmake -ENV PATH=$PATH:$USD_INSTALL_ROOT/bin -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$USD_INSTALL_ROOT/lib -ENV PYTHONPATH=$PYTHONPATH:$USD_INSTALL_ROOT/lib/python diff --git a/linux/centos7/vfx-2018/Dockerfile b/linux/centos7/vfx-2018/Dockerfile deleted file mode 100644 index 9c1d6ba..0000000 --- a/linux/centos7/vfx-2018/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to build a VFX Platform docker image - -FROM centos/devtoolset-7-toolchain-centos7 - -LABEL maintainer="Aloys.Baillet - Animal Logic" - -ARG current_host_ip_address - -ENV BUILD_PROCS 7 -ENV BUILD_DIR /opt/vfx -ENV TMP_DIR /tmp/vfx-build -ENV DOWNLOADS_DIR /tmp/vfx-downloads -ENV PATH $BUILD_DIR/bin:$PATH -ENV PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH -ENV LD_LIBRARY_PATH=$BUILD_DIR/lib64:$BUILD_DIR/lib:$LD_LIBRARY_PATH -ENV PYTHON_SITE_PACKAGES=$BUILD_DIR/lib/python2.7/site-packages -ENV PYTHON_EXECUTABLE=python -ENV PYTHONPATH=$PYTHONPATH:/opt/usd/lib/python:/opt/usd/lib/python/site-packages:/opt/usd/lib64/python/site-packages -ENV HTTP_HOSTNAME=$current_host_ip_address - -USER root - -RUN yum install -y --setopt=tsflags=nodocs wget make && yum clean all -y - -COPY scripts/build_vfx.sh scripts/build_vfx_base.sh scripts/download_vfx.sh /tmp/ - -# RUN /tmp/download_vfx.sh && \ -# /tmp/build_vfx_base.sh && \ -# /tmp/build_vfx.sh && \ -# rm -Rf $DOWNLOADS_DIR/* - -RUN /tmp/download_vfx.sh - -# @TODO MERGE IN ONE BUILD COMMAND! -RUN yum install -y perl -RUN mkdir -p $TMP_DIR - -#---------------------------------------------- -# build and install cmake -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/cmake-3.12.3.tar.gz &&\ - cd $TMP_DIR/cmake-3.12.3 && \ - ./bootstrap --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install Qt -#---------------------------------------------- -RUN cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/Maya-Qt5.6.1-2018.3.tgz && \ - cd $TMP_DIR/src && \ - ./configure \ - -prefix $BUILD_DIR \ - -opensource \ - -confirm-license \ - -no-rpath \ - -nomake examples \ - -I $BUILD_DIR/include \ - -L $BUILD_DIR/lib -RUN cd $TMP_DIR/src && make -j ${BUILD_PROCS} -RUN cd $TMP_DIR/src && make install - -# #---------------------------------------------- -# # build and install PySide -# #---------------------------------------------- -RUN yum install -y cmake python-pip python-setuptools python-devel libxml2-devel libxslt-devel - -RUN cd $TMP_DIR &&\ - unzip $DOWNLOADS_DIR/pyside2-maya2018.4.zip &&\ - cd pyside-setup &&\ - python setup.py build &&\ - python setup.py install - -CMD bash diff --git a/linux/centos7/vfx-lite-2018/Dockerfile b/linux/centos7/vfx-lite-2018/Dockerfile deleted file mode 100644 index bc100c9..0000000 --- a/linux/centos7/vfx-lite-2018/Dockerfile +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to build a VFX Platform docker image - -FROM centos/devtoolset-7-toolchain-centos7 - -LABEL maintainer="Aloys.Baillet - Animal Logic" - -ARG current_host_ip_address - -ENV BUILD_PROCS 7 -ENV BUILD_DIR /opt/vfx -ENV TMP_DIR /tmp/vfx-build -ENV DOWNLOADS_DIR /tmp/vfx-downloads -ENV PATH $BUILD_DIR/bin:$PATH -ENV PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH -ENV LD_LIBRARY_PATH=$BUILD_DIR/lib64:$BUILD_DIR/lib:$LD_LIBRARY_PATH -ENV PYTHON_SITE_PACKAGES=$BUILD_DIR/lib/python2.7/site-packages -ENV PYTHON_EXECUTABLE=python -ENV PYTHONPATH=$PYTHONPATH:/opt/usd/lib/python:/opt/usd/lib/python/site-packages:/opt/usd/lib64/python/site-packages -ENV HTTP_HOSTNAME=$current_host_ip_address - -USER root - -RUN yum install -y --setopt=tsflags=nodocs make wget bzip2 which python-devel zlib-devel bzip2-devel && yum clean all -y - -COPY scripts/download_vfx-lite-2018.sh /tmp/ - -RUN /tmp/download_vfx-lite-2018.sh - -RUN mkdir -p $TMP_DIR - -#---------------------------------------------- -# build and install cmake -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/cmake-3.12.3.tar.gz &&\ - cd $TMP_DIR/cmake-3.12.3 && \ - ./bootstrap --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install boost -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -jxf $DOWNLOADS_DIR/boost_1_61_0.tar.bz2 &&\ - cd $TMP_DIR/boost_1_61_0 &&\ - ./bootstrap.sh \ - --prefix=$BUILD_DIR &&\ - ./bjam \ - variant=release \ - link=shared \ - threading=multi \ - install - -#---------------------------------------------- -# build and install TBB -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/tbb2017_U6.tar.gz && \ - cd $TMP_DIR/tbb-2017_U6 && \ - make -j ${BUILD_PROCS} && \ - #make tbb_cpf=1 -j ${BUILD_PROCS} && \ - cp build/*_release/*.so* $BUILD_DIR/lib &&\ - cp -R include/* $BUILD_DIR/include/ - -#---------------------------------------------- -# build and install ilmbase -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/ilmbase-2.2.0.tar.gz &&\ - cd $TMP_DIR/ilmbase-2.2.0 && \ - ./configure --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install openexr -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/openexr-2.2.0.tar.gz &&\ - cd $TMP_DIR/openexr-2.2.0 && \ - ./configure --prefix=$BUILD_DIR --disable-ilmbasetest && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install jemalloc -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -xjf $DOWNLOADS_DIR/jemalloc-5.1.0.tar.bz2 &&\ - cd $TMP_DIR/jemalloc-5.1.0 &&\ - ./configure \ - --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install OpenSubdiv -#---------------------------------------------- -RUN cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/OpenSubdiv-3_3_3.tar.gz && \ - cd $TMP_DIR/OpenSubdiv-3_3_3 && \ - mkdir build && \ - cd build && \ - cmake .. \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DTBB_LOCATION=$BUILD_DIR \ - -DNO_EXAMPLES=1 \ - -DNO_REGRESSION=1 \ - -DNO_PTEX=1 \ - -DNO_OMP=1 \ - -DNO_OPENCL=1 \ - -DNO_OPENGL=1 \ - -DNO_CLEW=1 \ - -DNO_CUDA=1 \ - -DNO_TUTORIALS=1 && \ - make -j ${BUILD_PROCS} VERBOSE=1 && \ - make install - -RUN rm -rf $TMP_DIR - -CMD bash diff --git a/linux/centos7/vfx/Dockerfile b/linux/centos7/vfx/Dockerfile deleted file mode 100644 index f327133..0000000 --- a/linux/centos7/vfx/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -############################################################ -# Dockerfile to build USD on VFX Platform 2016 -# Based on nvidia/cuda:devel-centos6 - -FROM usd-docker/base:latest-centos7 - -LABEL maintainer="Aloys.Baillet - Animal Logic" - -ARG current_host_ip_address - -ENV PYTHON_SITE_PACKAGES=$BUILD_DIR/lib/python2.7/site-packages -ENV PYTHON_EXECUTABLE=python -ENV PYTHONPATH=$PYTHONPATH:/opt/usd/lib/python:/opt/usd/lib/python/site-packages:/opt/usd/lib64/python/site-packages -ENV HTTP_HOSTNAME=$current_host_ip_address - -COPY scripts/build_vfx.sh scripts/build_vfx_base.sh scripts/download_vfx.sh /tmp/ - -RUN /tmp/download_vfx.sh && \ - /tmp/build_vfx_base.sh && \ - /tmp/build_vfx.sh && \ - rm -Rf $DOWNLOADS_DIR/* diff --git a/linux/run-centos7.sh b/linux/run-centos7.sh deleted file mode 100755 index 16c747d..0000000 --- a/linux/run-centos7.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - - -docker run --runtime=nvidia --name "usd-docker" --rm -it --env DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --env QT_X11_NO_MITSHM=1 -v="$HOME:/home/usd:rw" -v="$(dirname `pwd`)/data:/data:rw" "usd-docker/usd:latest-centos7" "$@" diff --git a/linux/run-usd-lite.sh b/linux/run-usd-lite.sh deleted file mode 100755 index 11c95aa..0000000 --- a/linux/run-usd-lite.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - - -docker run --name "usd-lite" --rm -it -v="$HOME:/home/usd:rw" -v="$(dirname `pwd`)/data:/data:rw" "usd-docker/usd-lite:latest-centos7" "$@" diff --git a/linux/scripts/build_base.sh b/linux/scripts/build_base.sh deleted file mode 100755 index 351fe80..0000000 --- a/linux/scripts/build_base.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# Build script to be from a single in Dockerfile to minimise image size -mkdir -p $TMP_DIR - -cd $TMP_DIR && \ - tar xf $DOWNLOADS_DIR/gmp-5.1.2.tar.bz2 && \ - cd gmp-5.1.2 && CFLAGS=-m64 ./configure --prefix=$BUILD_DIR && \ - CFLAGS=-m64 LDFLAGS=-L$BUILD_DIR/lib64 make -j $BUILD_PROCS && make install -cd $TMP_DIR && \ - tar xf $DOWNLOADS_DIR/mpfr-3.1.2.tar.gz && \ - cd mpfr-3.1.2 && CFLAGS=-m64 ./configure --with-gmp=$BUILD_DIR --prefix=$BUILD_DIR && \ - CFLAGS=-m64 LDFLAGS=-L$BUILD_DIR/lib64 make -j $BUILD_PROCS && make install -cd $TMP_DIR && \ - tar xf $DOWNLOADS_DIR/mpc-1.0.1.tar.gz && \ - cd mpc-1.0.1 && CFLAGS=-m64 ./configure --with-gmp=$BUILD_DIR --prefix=$BUILD_DIR && \ - CFLAGS=-m64 LDFLAGS=-L$BUILD_DIR/lib64 make -j $BUILD_PROCS && make install -cd $TMP_DIR && \ - tar xf $DOWNLOADS_DIR/gcc-4.8.3.tar.gz && \ - cd gcc-4.8.3 && \ - LD_LIBRARY_PATH=$BUILD_DIR/lib64 LIBRARY_PATH="" CFLAGS=-m64 ./configure \ - -disable-multilib \ - --enable-languages=c,c++,fortran --enable-shared \ - --enable-threads=posix --enable-checkin=release \ - --with-gmp=$BUILD_DIR --with-mpc=$BUILD_DIR --with-mpfr=$BUILD_DIR \ - --prefix=$BUILD_DIR && \ - LD_LIBRARY_PATH=$BUILD_DIR/lib LIBRARY_PATH="" CFLAGS=-m64 LDFLAGS=-L$BUILD_DIR/lib64 make bootstrap -j $BUILD_PROCS && \ - make install -cd $TMP_DIR && \ - tar xf $DOWNLOADS_DIR/binutils-2.24.tar.gz && \ - cd binutils-2.24 && CFLAGS=-m64 ./configure --prefix=$BUILD_DIR && \ - CFLAGS=-m64 LDFLAGS=-L$BUILD_DIR/lib64 make -j $BUILD_PROCS && make install - -ln -s $BUILD_DIR/lib64/lib* $BUILD_DIR/lib/ - -#---------------------------------------------- -# build and install PYTHON -#---------------------------------------------- -cd $TMP_DIR && \ - tar -jxf $DOWNLOADS_DIR/Python-2.7.5.tar.bz2 && \ - cd $TMP_DIR/Python-2.7.5 && \ - ./configure \ - --prefix=$BUILD_DIR \ - --enable-unicode=ucs4 \ - --enable-shared && \ - make -j $BUILD_PROCS && \ - make install - -#---------------------------------------------- -# build and install GOOGLETEST -#---------------------------------------------- -cd $TMP_DIR - git clone https://github.com/google/googletest.git - mkdir build_gtest - cd build_gtest - cmake -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=$BUILD_DIR ../googletest - make -j$BUILD_PROCS install - cd .. - rm -rf build_gtest googletest - -rm -rf $TMP_DIR diff --git a/linux/scripts/build_cmake.sh b/linux/scripts/build_cmake.sh deleted file mode 100755 index f8b0982..0000000 --- a/linux/scripts/build_cmake.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# Build script to be run from a single RUN in Dockerfile to minimise image size -mkdir -p $TMP_DIR - -wget https://cmake.org/files/v3.7/cmake-3.7.1.tar.gz -P $DOWNLOADS_DIR -nc - -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/cmake-3.7.1.tar.gz &&\ - cd $TMP_DIR/cmake-3.7.1 && \ - ./bootstrap --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install diff --git a/linux/scripts/build_maya.sh b/linux/scripts/build_maya.sh deleted file mode 100755 index 6632844..0000000 --- a/linux/scripts/build_maya.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -mkdir -p $TMP_DIR - -mkdir -p $MAYA_LOCATION - -#---------------------------------------------- -# Install Maya DevKit -#---------------------------------------------- - -cd $TMP_DIR && \ - mkdir Maya${MAYA_MAJOR_VERSION}devkit && \ - cd Maya${MAYA_MAJOR_VERSION}devkit && \ - tar -xvzf $DOWNLOADS_DIR/Maya${MAYA_MAJOR_VERSION}_DEVKIT_Linux.tgz -cd / && \ - cp -R $TMP_DIR/Maya${MAYA_MAJOR_VERSION}devkit/devkitBase/cmake $MAYA_LOCATION && \ - cp -R $TMP_DIR/Maya${MAYA_MAJOR_VERSION}devkit/devkitBase/devkit $MAYA_LOCATION && \ - cp -R $TMP_DIR/Maya${MAYA_MAJOR_VERSION}devkit/devkitBase/include $MAYA_LOCATION && \ - cp -R $TMP_DIR/Maya${MAYA_MAJOR_VERSION}devkit/devkitBase/mkspecs $MAYA_LOCATION && \ - cp -R $TMP_DIR/Maya${MAYA_MAJOR_VERSION}devkit/devkitBase/lib $MAYA_LOCATION - -# Extract Maya's QT libraries -cd $MAYA_LOCATION/include -tar xvf qt-5.6.1-include.tar.gz - -cd $MAYA_LOCATION/cmake -tar xvf qt-5.6.1-cmake.tar.gz - -cd $MAYA_LOCATION/mkspecs -tar xvf qt-5.6.1-mkspecs.tar.gz - -# Dummy mayapy for USD's FindMaya cmake macro -mkdir $MAYA_LOCATION/bin -touch $MAYA_LOCATION/bin/mayapy -chmod +x $MAYA_LOCATION/bin/mayapy - -rm -rf $TMP_DIR diff --git a/linux/scripts/build_usd.sh b/linux/scripts/build_usd.sh deleted file mode 100755 index c236841..0000000 --- a/linux/scripts/build_usd.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# Build script to be run from a single RUN in Dockerfile to minimise image size -mkdir -p $TMP_DIR - -#---------------------------------------------- -# build and install USD -#---------------------------------------------- -if [ -n "${MAYA_MAJOR_VERSION}" ]; then - echo "Build USD with Maya ${MAYA_MAJOR_VERSION}" - export MAYA_EXECUTABLE= - export MAYA_OPS="-DPXR_BUILD_MAYA_PLUGIN=TRUE -DMAYA_LOCATION=/opt/usd/maya${MAYA_MAJOR_VERSION}DevKit -DMAYA_EXECUTABLE=/opt/usd/maya${MAYA_MAJOR_VERSION}DevKit/bin/mayald" -else - export MAYA_OPS="-DPXR_BUILD_MAYA_PLUGIN=FALSE" -fi - -cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/USD-v${USD_VERSION}.tar.gz && \ - cd $TMP_DIR/USD-${USD_VERSION} && \ - mkdir build && \ - cd build && \ - cmake \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/usd/${USD_VERSION} \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR \ - -DPXR_BUILD_TESTS=ON \ - -DOPENEXR_LOCATION=$BUILD_DIR \ - -DPTEX_INCLUDE_DIR=$BUILD_DIR/include/ptex \ - -DOPENSUBDIV_ROOT_DIR=$BUILD_DIR \ - -DPTEX_LIBRARY=$BUILD_DIR/lib/libPtex.so \ - -DGLEW_INCLUDE_DIR=$BUILD_DIR/include/GL \ - -DGLEW_LIBRARY=$BUILD_DIR/lib/libGLEW.so \ - -DPXR_MALLOC_LIBRARY:path=$BUILD_DIR/lib/libjemalloc.so \ - -DPXR_BUILD_ALEMBIC_PLUGIN=ON \ - ${MAYA_OPS} \ - .. - -cd $TMP_DIR/USD-${USD_VERSION}/build && \ - make -j ${BUILD_PROCS} - -cd $TMP_DIR/USD-${USD_VERSION}/build && \ - make install - -#mkdir -p $BUILD_DIR/usd/${USD_VERSION}/extras/usdObj -#cp $TMP_DIR/USD-$USD_VERSION/build/extras/usd/examples/usdObj/plugInfo.json $BUILD_DIR/usd/${USD_VERSION}/extras/usdObj -#cp $TMP_DIR/USD-$USD_VERSION/build/extras/usd/examples/usdObj/usdObj.so $BUILD_DIR/usd/${USD_VERSION}/extras/usdObj - -rm -rf $TMP_DIR diff --git a/linux/scripts/build_usd_maya_tbb_workaround.sh b/linux/scripts/build_usd_maya_tbb_workaround.sh deleted file mode 100755 index 72c3240..0000000 --- a/linux/scripts/build_usd_maya_tbb_workaround.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# Build script to be run from a single RUN in Dockerfile to minimise image size -mkdir -p $TMP_DIR - -#---------------------------------------------- -# build and install USD -#---------------------------------------------- -wget https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz -O $DOWNLOADS_DIR/USD-${USD_VERSION}.tar.gz -nc - -cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/USD-${USD_VERSION}.tar.gz && \ - cd $TMP_DIR/USD-${USD_VERSION} && \ - mkdir build && \ - cd build && \ - # Build and install usd with PXR_MAYA_TBB_BUG_WORKAROUND activated - cmake \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR/usd/${USD_VERSION} \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR \ - -DPXR_BUILD_TESTS=OFF \ - -DPXR_MAYA_TBB_BUG_WORKAROUND=ON \ - -DOPENEXR_LOCATION=$BUILD_DIR \ - -DPTEX_INCLUDE_DIR=$BUILD_DIR/include/ptex \ - -DOIIO_BASE_DIR=$BUILD_DIR \ - -DOPENSUBDIV_ROOT_DIR=$BUILD_DIR \ - -DPTEX_LIBRARY=$BUILD_DIR/lib/libPtex.so \ - -DGLEW_INCLUDE_DIR=$BUILD_DIR/include/GL \ - -DGLEW_LIBRARY=$BUILD_DIR/lib/libGLEW.so \ - -DPXR_MALLOC_LIBRARY:path=$BUILD_DIR/lib/libjemalloc.so \ - .. && \ - make -j ${BUILD_PROCS} && \ - make install && \ - cd - diff --git a/linux/scripts/build_vfx.sh b/linux/scripts/build_vfx.sh deleted file mode 100755 index 009d267..0000000 --- a/linux/scripts/build_vfx.sh +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# Build script to be run from a single RUN in Dockerfile to minimise image size -mkdir -p $TMP_DIR - -#---------------------------------------------- -# build and install ilmbase -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/ilmbase-2.2.0.tar.gz &&\ - cd $TMP_DIR/ilmbase-2.2.0 && \ - ./configure --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install; - -#---------------------------------------------- -# build and install openexr -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/openexr-2.2.0.tar.gz &&\ - cd $TMP_DIR/openexr-2.2.0 && \ - ./configure --prefix=$BUILD_DIR --disable-ilmbasetest && \ - make -j ${BUILD_PROCS} && \ - make install; - -#---------------------------------------------- -# build and install OCIO -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/OpenColorIO-1.0.9.tar.gz &&\ - cd $TMP_DIR/OpenColorIO-1.0.9 &&\ - cmake \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DOCIO_BUILD_TRUELIGHT=OFF \ - -DOCIO_BUILD_APPS=OFF \ - -DCMAKE_C_COMPILER=gcc \ - -DCMAKE_CXX_COMPILER=g++ \ - -DOCIO_BUILD_NUKE=OFF &&\ - make -j ${BUILD_PROCS} && \ - make install; - -mkdir -p $BUILD_DIR/openColorIO &&\ - cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/OpenColorIO-Configs-1.0_r2.tar.gz &&\ - cd $TMP_DIR/OpenColorIO-Configs-1.0_r2 &&\ - cp nuke-default/config.ocio $BUILD_DIR/openColorIO &&\ - cp -r nuke-default/luts $BUILD_DIR/openColorIO; - -#---------------------------------------------- -# build and install OIIO -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/oiio-1.5.11.tar.gz &&\ - cd oiio-Release-1.5.11 &&\ - mkdir -p build &&\ - cd build &&\ - cmake .. \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install MarkupSafe (Jinja2 dependency) -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/MarkupSafe-0.23.tar.gz &&\ - cd $TMP_DIR/MarkupSafe-0.23 && \ - $PYTHON_EXECUTABLE setup.py install - -#---------------------------------------------- -# build and install Jinja2 (USD Dependency) -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/Jinja2-2.8.tar.gz &&\ - cd $TMP_DIR/Jinja2-2.8 && \ - $PYTHON_EXECUTABLE setup.py install - -#---------------------------------------------- -# build and install pyIlmBase -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/pyilmbase-2.2.0.tar.gz &&\ - cd $TMP_DIR/pyilmbase-2.2.0 && \ - ./configure --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install; - -#---------------------------------------------- -# build and install alembic -#---------------------------------------------- -cd $TMP_DIR &&\ - unzip $DOWNLOADS_DIR/alembic-1.5.8.zip -d $TMP_DIR &&\ - cd $TMP_DIR/alembic-1.5.8 &&\ - sed -i '/SET( Boost_USE_STATIC_LIBS TRUE )/d' build/AlembicBoost.cmake &&\ - sed -i 's/SET( ALEMBIC_GL_LIBS GLEW ${GLUT_LIBRARY} ${OPENGL_LIBRARIES} )/FIND_PACKAGE( GLEW )\n SET( ALEMBIC_GL_LIBS ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${OPENGL_LIBRARIES} )/g' CMakeLists.txt &&\ - cmake \ - -D CMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -D CMAKE_PREFIX_PATH=$BUILD_DIR \ - -D Boost_NO_SYSTEM_PATHS=TRUE \ - -D Boost_NO_BOOST_CMAKE=TRUE \ - -D BOOST_ROOT=$BUILD_DIR \ - -D ILMBASE_ROOT=$BUILD_DIR \ - -D USE_PYILMBASE=FALSE \ - -D USE_PYALEMBIC=FALSE \ - -D USE_ARNOLD=FALSE \ - -D USE_PRMAN=FALSE \ - -D USE_MAYA=FALSE \ - . &&\ - make -j ${BUILD_PROCS} &&\ - make install &&\ - mv $BUILD_DIR/alembic-*/include/* $BUILD_DIR/include &&\ - mv $BUILD_DIR/alembic-*/lib/static/* $BUILD_DIR/lib - -#---------------------------------------------- -# build and install Ptex -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/ptex-2.0.41.tar.gz &&\ - cd $TMP_DIR/ptex-2.0.41/src && \ - cmake -DCMAKE_INSTALL_PREFIX=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - cp ptex/libPtex.so $BUILD_DIR/lib/ && \ - mkdir $BUILD_DIR/include/ptex && \ - cp ../src/ptex/*.h $BUILD_DIR/include/ptex - -#---------------------------------------------- -# build and install OpenSubdiv -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/OpenSubdiv-3_1_0.tar.gz && \ - cd $TMP_DIR/OpenSubdiv-3_1_0 && \ - mkdir build && \ - cd build && \ - /usr/bin/cmake .. \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \ - -DOPENCL_INCLUDE_DIRS=/usr/local/cuda/include \ - -DOPENCL_LIBRARIES=/usr/local/cuda/lib64/libOpenCL.so \ - -DTBB_LOCATION=$BUILD_DIR \ - -DPTEX_INCLUDE_DIR=$BUILD_DIR/include \ - -DPTEX_LOCATION=$BUILD_DIR \ - -DGLFW_LOCATION=$BUILD_DIR \ - -DGLEW_INCLUDE_DIR=$BUILD_DIR/include \ - -DGLEW_LIBRARY=$BUILD_DIR/lib/libGLEW.so \ - -DNO_EXAMPLES=ON \ - -DNO_REGRESSION=1 \ - -DOSD_CUDA_NVCC_FLAGS="--gpu-architecture compute_30" \ - -DNO_TUTORIALS=ON && \ - make VERBOSE=1 && \ - make install - -rm -rf $TMP_DIR diff --git a/linux/scripts/build_vfx_base.sh b/linux/scripts/build_vfx_base.sh deleted file mode 100755 index 9e28ef8..0000000 --- a/linux/scripts/build_vfx_base.sh +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -ex - -# Build script to be run from a single RUN in Dockerfile to minimise image size -mkdir -p $TMP_DIR - -#---------------------------------------------- -# build and install setuptools -#---------------------------------------------- -if [ "`cat /etc/redhat-release | grep -oP '(?<= )[0-9]+(?=\.)'`" == "6" ]; then -wget https://pypi.io/packages/source/s/setuptools/setuptools-30.0.0.tar.gz -P $DOWNLOADS_DIR -nc --no-check-certificate -cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/setuptools-30.0.0.tar.gz && \ - cd $TMP_DIR/setuptools-30.0.0 && \ - $PYTHON_EXECUTABLE setup.py install -fi - -#---------------------------------------------- -# build and install readline -#---------------------------------------------- -cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/readline-6.2.4.1.tar.gz && \ - cd $TMP_DIR/readline-6.2.4.1 && \ - $PYTHON_EXECUTABLE setup.py install - -#---------------------------------------------- -# build and install boost -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -jxf $DOWNLOADS_DIR/boost_1_61_0.tar.bz2 &&\ - cd $TMP_DIR/boost_1_61_0 &&\ - ./bootstrap.sh \ - --prefix=$BUILD_DIR \ - --with-python=$BUILD_DIR/bin/$PYTHON_EXECUTABLE \ - --with-python-root=$BUILD_DIR && \ - ./bjam -j $BUILD_PROCS \ - -a \ - -d+2 \ - variant=release \ - link=shared \ - link=static \ - threading=multi \ - install - -#---------------------------------------------- -# build and install JPEG -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/jpegsrc.v8c.tar.gz && \ - cd $TMP_DIR/jpeg-8c && \ - ./configure \ - --prefix=$BUILD_DIR && \ - make && \ - make install - -#---------------------------------------------- -# build and install TIFF -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/tiff-3.8.2.tar.gz && \ - cd $TMP_DIR/tiff-3.8.2 && \ - ./configure \ - --prefix=$BUILD_DIR && \ - make && \ - make install - -#---------------------------------------------- -# build and install PNG -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/libpng-1.6.26.tar.gz && \ - cd $TMP_DIR/libpng-1.6.26 && \ - ./configure \ - --prefix=$BUILD_DIR && \ - make && \ - make install - -#---------------------------------------------- -# build and install Freetype -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/freetype-2.4.12.tar.gz && \ - cd $TMP_DIR/freetype-2.4.12 && \ - ./configure \ - --prefix=$BUILD_DIR && \ - make && \ - make install - -#---------------------------------------------- -# build and install PyOpenGL -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/PyOpenGL-3.0.2.tar.gz &&\ - cd $TMP_DIR/PyOpenGL-3.0.2 &&\ - $PYTHON_EXECUTABLE setup.py install - - -if [ "`cat /etc/redhat-release | grep -oP '(?<= )[0-9]+(?=\.)'`" == "6" ]; then -# CentOS 6 only - -#---------------------------------------------- -# build and install Qt -#---------------------------------------------- -cd $TMP_DIR && \ - tar -zxf $DOWNLOADS_DIR/qt-everywhere-opensource-src-4.8.6.tar.gz && \ - cd $TMP_DIR/qt-everywhere-opensource-src-4.8.6 && \ - #unzip $DOWNLOADS_DIR/Qt-4_8_6_forMaya2016.zip -d $TMP_DIR && \ - #tar -zxf $TMP_DIR/Qt/qt-adsk-4.8.6.tgz && \ - #cd qt-adsk-4.8.6 && \ - ./configure \ - -prefix $BUILD_DIR \ - -opensource \ - -confirm-license \ - -no-rpath \ - -no-qt3support \ - -xrender \ - -opengl desktop \ - -nomake examples \ - -nomake demos \ - -I $BUILD_DIR/include \ - -I $BUILD_DIR/include/freetype2 \ - -L $BUILD_DIR/lib &&\ - make -j ${BUILD_PROCS} && \ - make install - -# #---------------------------------------------- -# # build and install PySide -# #---------------------------------------------- -cd $TMP_DIR &&\ - tar -jxf $DOWNLOADS_DIR/pyside-qt4.8+1.2.2.tar.bz2 &&\ - tar -jxf $DOWNLOADS_DIR/shiboken-1.2.2.tar.bz2 &&\ - tar -zxf $DOWNLOADS_DIR/pysidetools-0.2.15.tar.gz &&\ - cd $TMP_DIR/shiboken-1.2.2 &&\ - rm -f build &&\ - mkdir build &&\ - cd build &&\ - cmake .. \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DPYTHON_SITE_PACKAGES=$PYTHON_SITE_PACKAGES \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR \ - -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE &&\ - make VERBOSE=1 -j ${BUILD_PROCS} &&\ - make install &&\ - cd $TMP_DIR/pyside-qt4.8+1.2.2 &&\ - rm -f build &&\ - mkdir build &&\ - cd build &&\ - cmake .. \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DPYTHON_SITE_PACKAGES=$PYTHON_SITE_PACKAGES \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR \ - -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE &&\ - make VERBOSE=1 -j ${BUILD_PROCS} &&\ - make install &&\ - cd $TMP_DIR/Tools-0.2.15 &&\ - mkdir build &&\ - cd build &&\ - cmake .. \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ - -DPYTHON_SITE_PACKAGES=$PYTHON_SITE_PACKAGES \ - -DCMAKE_PREFIX_PATH=$BUILD_DIR \ - -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE &&\ - make -j ${BUILD_PROCS} &&\ - make install -fi - -#---------------------------------------------- -# build and install TBB -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/tbb43_20150611oss_src.tgz && \ - cd $TMP_DIR/tbb43_20150611oss && \ - make -j ${BUILD_PROCS} && \ - cp build/*_release/*.so* $BUILD_DIR/lib &&\ - cp -R include/* $BUILD_DIR/include/; - -#---------------------------------------------- -# build and install FONTS -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/ttf-bitstream-vera-1.10.tar.gz &&\ - cd $TMP_DIR/ttf-bitstream-vera-1.10 &&\ - mkdir -p $BUILD_DIR/fonts && \ - cp *.ttf $BUILD_DIR/fonts; - -#---------------------------------------------- -# build and install GLEW -#---------------------------------------------- -mkdir -p $BUILD_DIR/lib64/pkgconfig &&\ - cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/glew-2.0.0.tgz &&\ - cd $TMP_DIR/glew-2.0.0 &&\ - make install GLEW_DEST=$BUILD_DIR LIBDIR=$BUILD_DIR/lib; - -#---------------------------------------------- -# build and install hdf5 -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/hdf5-1.8.11.tar.gz &&\ - cd hdf5-1.8.11 &&\ - ./configure \ - --prefix=$BUILD_DIR \ - --enable-threadsafe \ - --with-pthread=/usr/include &&\ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install numpy -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/numpy-1.9.2.tar.gz &&\ - cd $TMP_DIR/numpy-1.9.2 && \ - $PYTHON_EXECUTABLE setup.py install - -#---------------------------------------------- -# build and install glfw -#---------------------------------------------- -cd $TMP_DIR &&\ - unzip $DOWNLOADS_DIR/glfw-3.2.1.zip -d $TMP_DIR &&\ - cd $TMP_DIR/glfw-3.2.1 && \ - cmake \ - -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DGLFW_BUILD_DOCS=OFF && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# build and install jemalloc -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -xjf $DOWNLOADS_DIR/jemalloc-4.3.1.tar.bz2 &&\ - cd $TMP_DIR/jemalloc-4.3.1 &&\ - ./configure \ - --prefix=$BUILD_DIR && \ - make -j ${BUILD_PROCS} && \ - make install - -#---------------------------------------------- -# install cmake-3 -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/cmake-3.11.4-Linux-x86_64.tar.gz &&\ - mv cmake-3.11.4-Linux-x86_64 $BUILD_DIR/cmake-3 - -#---------------------------------------------- -# build and install gtest -#---------------------------------------------- -cd $TMP_DIR &&\ - tar -zxf $DOWNLOADS_DIR/googletest-1.8.1.tar.gz &&\ - cd $TMP_DIR/googletest-release-1.8.1 && \ - mkdir build && cd build && \ - $BUILD_DIR/cmake-3/bin/cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$BUILD_DIR .. && \ - make -j ${BUILD_PROCS} && \ - make install - -rm -rf $TMP_DIR diff --git a/linux/scripts/download_maya.sh b/linux/scripts/download_maya.sh deleted file mode 100755 index 6c2276d..0000000 --- a/linux/scripts/download_maya.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# create build dir -mkdir -p $DOWNLOADS_DIR - -function getFileWithFallback() { - # $1 local path to the file on the HTTP server - # $2 path which will be used in the wget call if the file couldn't be found in the local HTTP server - # $3 the name that the file will be written out as once pulled from wget - - local filepath="$1" - local wgetPath="$2" - if [ ! -f $DOWNLOADS_DIR/$filepath ]; then - if [[ -z "${HTTP_HOSTNAME}" ]]; then - wget $wgetPath -P "$DOWNLOADS_DIR" -O "$DOWNLOADS_DIR/$filepath" -nc - if [[ $? -ne 0 ]]; then - echo "Failed to get file $wgetPath and rename to '$DOWNLOADS_DIR/$filepath'" - exit 1 - fi - else - echo "Downloading from proxy http: http://${HTTP_HOSTNAME}:8000/${filepath}" - wget -q http://${HTTP_HOSTNAME}:8000/${filepath} -P "$DOWNLOADS_DIR" - fi - fi -} - -if [ "$MAYA_MAJOR_VERSION" = "2018" ]; then - getFileWithFallback Maya2018_DEVKIT_Linux.tgz https://s3-us-west-2.amazonaws.com/autodesk-adn-transfer/ADN+Extranet/M%26E/Maya/devkit+2018/Maya2018u4_DEVKIT_Linux.tgz ; -else - getFileWithFallback Maya2017_DEVKIT_Linux.tgz https://s3-us-west-2.amazonaws.com/autodesk-adn-transfer/ADN+Extranet/M%26E/Maya/devkit+2017/Maya2017u4_DEVKIT_Linux.tgz ; -fi diff --git a/linux/scripts/download_vfx-2018.sh b/linux/scripts/download_vfx-2018.sh deleted file mode 100755 index 99cb0f3..0000000 --- a/linux/scripts/download_vfx-2018.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# create build dir -mkdir -p $DOWNLOADS_DIR - -function getFileWithFallback() { - # $1 local path to the file on the HTTP server - # $2 path which will be used in the wget call if the file couldn't be found in the local HTTP server - # $3 the name that the file will be written out as once pulled from wget - - local filepath="$1" - local wgetPath="$2" - if [ ! -f $DOWNLOADS_DIR/$filepath ]; then - if [[ -z "${HTTP_HOSTNAME}" ]]; then - wget $wgetPath -P "$DOWNLOADS_DIR" -O "$DOWNLOADS_DIR/$filepath" -nc - if [[ $? -ne 0 ]]; then - echo "Failed to get file $wgetPath and rename to '$DOWNLOADS_DIR/$filepath'" - exit 1 - fi - else - echo "Downloading from proxy http: http://${HTTP_HOSTNAME}:8000/${filepath}" - wget -q http://${HTTP_HOSTNAME}:8000/${filepath} -P "$DOWNLOADS_DIR" - fi - fi -} - -getFileWithFallback Maya-Qt5.6.1-2018.3.tgz https://www.autodesk.com/content/dam/autodesk/www/Company/files/Maya-Qt5.6.1-2018.3.tgz - -getFileWithFallback pyside2-maya2018.4.zip https://www.autodesk.com/content/dam/autodesk/www/Company/files/pyside2-maya2018.4.zip - -getFileWithFallback jpegsrc.v8c.tar.gz http://www.ijg.org/files/jpegsrc.v8c.tar.gz - -getFileWithFallback tiff-3.8.2.tar.gz http://pkgs.fedoraproject.org/repo/pkgs/libtiff/tiff-3.8.2.tar.gz/fbb6f446ea4ed18955e2714934e5b698/tiff-3.8.2.tar.gz - -getFileWithFallback libpng-1.6.26.tar.gz "https://downloads.sourceforge.net/project/libpng/libpng16/older-releases/1.6.26/libpng-1.6.26.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Flibpng%2Ffiles%2Flibpng16%2Folder-releases%2F1.6.26%2Flibpng-1.6.26.tar.gz%2Fdownload%3Fuse_mirror%3Dfreefr&ts=1501043258&use_mirror=svwh" - -getFileWithFallback PyOpenGL-3.0.2.tar.gz https://pypi.python.org/packages/source/P/PyOpenGL/PyOpenGL-3.0.2.tar.gz - -getFileWithFallback glew-1.10.0.tgz "https://downloads.sourceforge.net/project/glew/glew/1.10.0/glew-1.10.0.tgz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fglew%2Ffiles%2Fglew%2F1.10.0%2Fglew-1.10.0.tgz%2Fdownload&ts=1501043354&use_mirror=svwh" - -getFileWithFallback OpenColorIO-1.0.9.tar.gz https://github.com/imageworks/OpenColorIO/archive/v1.0.9.tar.gz - -getFileWithFallback OpenColorIO-Configs-1.0_r2.tar.gz http://github.com/imageworks/OpenColorIO-Configs/archive/v1.0_r2.tar.gz - -getFileWithFallback oiio-1.5.11.tar.gz https://github.com/OpenImageIO/oiio/archive/Release-1.5.11.tar.gz - -getFileWithFallback hdf5-1.8.11.tar.gz https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.11/src/hdf5-1.8.11.tar.gz - -getFileWithFallback numpy-1.9.2.tar.gz "https://downloads.sourceforge.net/project/numpy/NumPy/1.9.2/numpy-1.9.2.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fnumpy%2Ffiles%2FNumPy%2F1.9.2%2Fnumpy-1.9.2.tar.gz%2Fdownload&ts=1501045534&use_mirror=svwh" - -getFileWithFallback pyilmbase-2.2.0.tar.gz http://download.savannah.nongnu.org/releases/openexr/pyilmbase-2.2.0.tar.gz - -getFileWithFallback alembic-1.5.8.zip https://github.com/alembic/alembic/archive/1.5.8.zip alembic-1.5.8.zip - -getFileWithFallback ptex-2.0.41.tar.gz http://github.com/wdas/ptex/archive/v2.0.41.tar.gz - -getFileWithFallback glfw-3.2.1.zip https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip - -getFileWithFallback jemalloc-5.1.0.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/5.1.0/jemalloc-5.1.0.tar.bz2 - -getFileWithFallback googletest-1.8.1.tar.gz https://github.com/google/googletest/archive/release-1.8.1.tar.gz diff --git a/linux/scripts/download_vfx-lite-2018.sh b/linux/scripts/download_vfx-lite-2018.sh deleted file mode 100755 index ba05a91..0000000 --- a/linux/scripts/download_vfx-lite-2018.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# create build dir -mkdir -p $DOWNLOADS_DIR - -function getFileWithFallback() { - # $1 local path to the file on the HTTP server - # $2 path which will be used in the wget call if the file couldn't be found in the local HTTP server - # $3 the name that the file will be written out as once pulled from wget - - local filepath="$1" - local wgetPath="$2" - if [ ! -f $DOWNLOADS_DIR/$filepath ]; then - if [[ -z "${HTTP_HOSTNAME}" ]]; then - wget $wgetPath -P "$DOWNLOADS_DIR" -O "$DOWNLOADS_DIR/$filepath" -nc - if [[ $? -ne 0 ]]; then - echo "Failed to get file $wgetPath and rename to '$DOWNLOADS_DIR/$filepath'" - exit 1 - fi - else - echo "Downloading from proxy http: http://${HTTP_HOSTNAME}:8000/${filepath}" - wget -q http://${HTTP_HOSTNAME}:8000/${filepath} -P "$DOWNLOADS_DIR" - fi - fi -} - -getFileWithFallback cmake-3.12.3.tar.gz https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz - -getFileWithFallback boost_1_61_0.tar.bz2 https://svwh.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2 - -getFileWithFallback tbb2017_U6.tar.gz https://github.com/01org/tbb/archive/2017_U6.tar.gz - -getFileWithFallback openexr-2.2.0.tar.gz http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz - -getFileWithFallback ilmbase-2.2.0.tar.gz http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.0.tar.gz - -getFileWithFallback OpenSubdiv-3_3_3.tar.gz https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_3_3.tar.gz - -getFileWithFallback jemalloc-5.1.0.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/5.1.0/jemalloc-5.1.0.tar.bz2 - -getFileWithFallback cmake-3.11.4-Linux-x86_64.tar.gz https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz diff --git a/linux/scripts/download_vfx.sh b/linux/scripts/download_vfx.sh deleted file mode 100755 index e15315f..0000000 --- a/linux/scripts/download_vfx.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) Animal Logic Pty Ltd. All rights reserved. - -set -e - -# create build dir -mkdir -p $DOWNLOADS_DIR - -function getFileWithFallback() { - # $1 local path to the file on the HTTP server - # $2 path which will be used in the wget call if the file couldn't be found in the local HTTP server - # $3 the name that the file will be written out as once pulled from wget - - local filepath="$1" - local wgetPath="$2" - if [ ! -f $DOWNLOADS_DIR/$filepath ]; then - if [[ -z "${HTTP_HOSTNAME}" ]]; then - wget $wgetPath -P "$DOWNLOADS_DIR" -O "$DOWNLOADS_DIR/$filepath" -nc - if [[ $? -ne 0 ]]; then - echo "Failed to get file $wgetPath and rename to '$DOWNLOADS_DIR/$filepath'" - exit 1 - fi - else - echo "Downloading from proxy http: http://${HTTP_HOSTNAME}:8000/${filepath}" - wget -q http://${HTTP_HOSTNAME}:8000/${filepath} -P "$DOWNLOADS_DIR" - fi - fi -} - -getFileWithFallback readline-6.2.4.1.tar.gz https://pypi.python.org/packages/source/r/readline/readline-6.2.4.1.tar.gz - -getFileWithFallback boost_1_61_0.tar.bz2 https://svwh.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2 - -getFileWithFallback jpegsrc.v8c.tar.gz http://www.ijg.org/files/jpegsrc.v8c.tar.gz - -getFileWithFallback tiff-3.8.2.tar.gz http://pkgs.fedoraproject.org/repo/pkgs/libtiff/tiff-3.8.2.tar.gz/fbb6f446ea4ed18955e2714934e5b698/tiff-3.8.2.tar.gz - -getFileWithFallback libpng-1.6.26.tar.gz "https://downloads.sourceforge.net/project/libpng/libpng16/older-releases/1.6.26/libpng-1.6.26.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Flibpng%2Ffiles%2Flibpng16%2Folder-releases%2F1.6.26%2Flibpng-1.6.26.tar.gz%2Fdownload%3Fuse_mirror%3Dfreefr&ts=1501043258&use_mirror=svwh" - -getFileWithFallback freetype-2.4.12.tar.gz "https://downloads.sourceforge.net/project/freetype/freetype2/2.4.12/freetype-2.4.12.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Ffreetype%2Ffiles%2Ffreetype2%2F2.4.12%2Ffreetype-2.4.12.tar.gz%2Fdownload&ts=1501048824&use_mirror=svwh" - -getFileWithFallback PyOpenGL-3.0.2.tar.gz https://pypi.python.org/packages/source/P/PyOpenGL/PyOpenGL-3.0.2.tar.gz - -getFileWithFallback qt-everywhere-opensource-src-4.8.6.tar.gz http://download.qt.io/archive/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz - -getFileWithFallback pyside-qt4.8+1.2.2.tar.bz2 http://download.qt-project.org/official_releases/pyside/pyside-qt4.8+1.2.2.tar.bz2 - -getFileWithFallback shiboken-1.2.2.tar.bz2 http://download.qt-project.org/official_releases/pyside/shiboken-1.2.2.tar.bz2 - -getFileWithFallback pysidetools-0.2.15.tar.gz https://github.com/PySide/Tools/archive/0.2.15.tar.gz - -getFileWithFallback tbb43_20150611oss_src.tgz https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb43_20150611oss_src.tgz - -getFileWithFallback openexr-2.2.0.tar.gz http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz - -getFileWithFallback ilmbase-2.2.0.tar.gz http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.0.tar.gz - -getFileWithFallback ttf-bitstream-vera-1.10.tar.gz http://archive.ubuntu.com/ubuntu/pool/universe/t/ttf-bitstream-vera/ttf-bitstream-vera_1.10.orig.tar.gz - -getFileWithFallback glew-2.0.0.tgz "https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz/download" - -getFileWithFallback OpenColorIO-1.0.9.tar.gz https://github.com/imageworks/OpenColorIO/archive/v1.0.9.tar.gz - -getFileWithFallback OpenColorIO-Configs-1.0_r2.tar.gz http://github.com/imageworks/OpenColorIO-Configs/archive/v1.0_r2.tar.gz - -getFileWithFallback oiio-1.5.11.tar.gz https://github.com/OpenImageIO/oiio/archive/Release-1.5.11.tar.gz - -getFileWithFallback hdf5-1.8.11.tar.gz https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.11/src/hdf5-1.8.11.tar.gz - -getFileWithFallback numpy-1.9.2.tar.gz "https://downloads.sourceforge.net/project/numpy/NumPy/1.9.2/numpy-1.9.2.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fnumpy%2Ffiles%2FNumPy%2F1.9.2%2Fnumpy-1.9.2.tar.gz%2Fdownload&ts=1501045534&use_mirror=svwh" - -getFileWithFallback pyilmbase-2.2.0.tar.gz http://download.savannah.nongnu.org/releases/openexr/pyilmbase-2.2.0.tar.gz - -getFileWithFallback alembic-1.5.8.zip https://github.com/alembic/alembic/archive/1.5.8.zip alembic-1.5.8.zip - -getFileWithFallback ptex-2.0.41.tar.gz http://github.com/wdas/ptex/archive/v2.0.41.tar.gz - -getFileWithFallback glfw-3.2.1.zip https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip - -getFileWithFallback OpenSubdiv-3_1_0.tar.gz https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_1_0.tar.gz - -getFileWithFallback jemalloc-4.3.1.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/4.3.1/jemalloc-4.3.1.tar.bz2 - -getFileWithFallback MarkupSafe-0.23.tar.gz https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz - -getFileWithFallback Jinja2-2.8.tar.gz https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz - -getFileWithFallback cmake-3.11.4-Linux-x86_64.tar.gz https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz - -getFileWithFallback googletest-1.8.1.tar.gz https://github.com/google/googletest/archive/release-1.8.1.tar.gz diff --git a/linux/usd-jupyter/Dockerfile b/linux/usd-jupyter/Dockerfile new file mode 100644 index 0000000..f1584df --- /dev/null +++ b/linux/usd-jupyter/Dockerfile @@ -0,0 +1,27 @@ +ARG from_image=dockerusd/usd-lite +FROM ${from_image} + +ARG NB_USER=jovyan +ARG NB_UID=1000 + +RUN useradd -m -u ${NB_UID} ${NB_USER} && \ + su -c "echo '%${NB_USER} ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers" + +ENV USER=${NB_USER} \ + NB_UID=${NB_UID} \ + HOME=/home/${NB_USER} + +RUN pip3 install --no-cache-dir notebook==5.* jupyterlab + +COPY usd-jupyter/jupyter_notebook_config.py /etc/jupyter/ + +USER ${NB_USER} + +RUN mkdir /home/${NB_USER}/work +WORKDIR /home/${NB_USER}/work + +RUN jupyter notebook --generate-config + +EXPOSE 8888 + +ENTRYPOINT [ "jupyter", "lab" ] diff --git a/linux/usd-jupyter/jupyter_notebook_config.py b/linux/usd-jupyter/jupyter_notebook_config.py new file mode 100644 index 0000000..a69a030 --- /dev/null +++ b/linux/usd-jupyter/jupyter_notebook_config.py @@ -0,0 +1,10 @@ +from jupyter_core.paths import jupyter_data_dir +import subprocess +import os +import errno +import stat + +c = get_config() +c.NotebookApp.ip = '0.0.0.0' +c.NotebookApp.port = 8888 +c.NotebookApp.open_browser = False diff --git a/linux/usd-lite/Dockerfile b/linux/usd-lite/Dockerfile new file mode 100644 index 0000000..d014588 --- /dev/null +++ b/linux/usd-lite/Dockerfile @@ -0,0 +1,92 @@ +# Copyright (C) Animal Logic Pty Ltd. All rights reserved. + +############################################################ +ARG ASWF_ORG=aswf +ARG ASWF_PKG_ORG=aswf +ARG CI_COMMON_VERSION=1 +ARG VFXPLATFORM_VERSION=2020 + +FROM ${ASWF_PKG_ORG}/ci-package-python:${VFXPLATFORM_VERSION} as ci-package-python +FROM ${ASWF_PKG_ORG}/ci-package-tbb:${VFXPLATFORM_VERSION} as ci-package-tbb +FROM ${ASWF_PKG_ORG}/ci-package-boost:${VFXPLATFORM_VERSION} as ci-package-boost + +FROM centos/devtoolset-7-toolchain-centos7 as builder + +ARG current_host_ip_address +ARG usd_version + +ENV BUILD_PROCS 7 +ENV BUILD_DIR /usr/local/ +ENV TMP_DIR /tmp/vfx-build +ENV DOWNLOADS_DIR /tmp/vfx-downloads +ENV PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH +ENV PYTHON_EXECUTABLE=/usr/local/bin/python3 +ENV PYTHON_SITE_PACKAGES=$BUILD_DIR/lib/python2.7/site-packages +ENV PYTHONPATH=$PYTHONPATH:/usr/local/lib/python:/usr/local/lib/python/site-packages:/usr/local/lib64/python/site-packages +ENV HTTP_HOSTNAME=$current_host_ip_address +ENV USD_VERSION=$usd_version + +USER root + +RUN yum install -y --setopt=tsflags=nodocs make wget bzip2 which zlib-devel bzip2-devel && yum clean all -y + +RUN wget https://cmake.org/files/v3.17/cmake-3.17.4-Linux-x86_64.sh -P $DOWNLOADS_DIR -nc && \ + chmod u+x $DOWNLOADS_DIR/cmake-3.17.4-Linux-x86_64.sh && \ + $DOWNLOADS_DIR/cmake-3.17.4-Linux-x86_64.sh --skip-license --prefix=$BUILD_DIR + +COPY --from=ci-package-python /. /usr/local/ +COPY --from=ci-package-tbb /. /usr/local/ +COPY --from=ci-package-boost /. /usr/local/ + +ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH} \ + PATH=/usr/local/bin:${PATH} \ + CI_COMMON_VERSION=${CI_COMMON_VERSION} \ + VFXPLATFORM_VERSION=${VFXPLATFORM_VERSION} \ + TMP_DIR=/tmp/vfx-build \ + DOWNLOADS_DIR=/tmp/vfx-downloads + +COPY scripts/download_usd.sh /tmp/ +RUN /tmp/download_usd.sh +RUN pip3 install jinja2 +RUN mkdir -p $TMP_DIR +RUN cd $TMP_DIR && \ + tar -zxf $DOWNLOADS_DIR/USD-v${USD_VERSION}.tar.gz && \ + cd $TMP_DIR/USD-${USD_VERSION} && \ + mkdir build && \ + cd build && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \ + -DCMAKE_PREFIX_PATH=$BUILD_DIR \ + -DPXR_BUILD_TESTS=OFF \ + -DPXR_BUILD_IMAGING=OFF \ + -DTBB_ROOT_DIR=$BUILD_DIR \ + -DPXR_ENABLE_GL_SUPPORT=FALSE \ + -DPXR_ENABLE_PTEX_SUPPORT=FALSE \ + -DPXR_BUILD_ALEMBIC_PLUGIN=OFF \ + -DPXR_BUILD_USD_IMAGING=FALSE \ + -DPXR_USE_PYTHON_3=ON \ + .. + +RUN cd $TMP_DIR/USD-${USD_VERSION}/build && \ + make -j 6 + +RUN cd $TMP_DIR/USD-${USD_VERSION}/build && \ + make install + +# RUNTIME IMAGE +FROM centos:7 +ARG usd_version + +RUN yum install -y --setopt=tsflags=nodocs centos-release-scl-rh &&\ + yum install -y --setopt=tsflags=nodocs devtoolset-7-runtime &&\ + yum clean all -y + +COPY --from=builder /usr/local /usr/local + +ENV USD_VERSION=$usd_version + +ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH} \ + PATH=/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin \ + PYTHONPATH=$PYTHONPATH:/usr/local/lib/python:/usr/local/lib/python/site-packages:/usr/local/lib64/python/site-packages \ + CI_COMMON_VERSION=${CI_COMMON_VERSION} \ + VFXPLATFORM_VERSION=${VFXPLATFORM_VERSION}