From d6dc96e50b89a51055d710323161fd0cfc1dc18d Mon Sep 17 00:00:00 2001 From: Thibaud Gambier Date: Wed, 29 May 2024 21:28:52 +0200 Subject: [PATCH] included required libraries following Autodesk documentation (#7) # Summary - Updated all images to includes required libraries from Autodesk documentation. - Set `MAYA_NO_STANDALONE_ATEXIT=1` on all images. - Set `MAYA_DISABLE_ADP=1` on all images. - Updated documentation. --- 2022/Dockerfile | 115 +++++++++++++++++++++++++++++++++--------------- 2023/Dockerfile | 100 +++++++++++++++++++++++++++++------------ 2024/Dockerfile | 86 +++++++++++++++++++++++++++++------- 2025/Dockerfile | 94 +++++++++++++++++++++++++++++++-------- README.md | 99 +++++++++++++++++++++++++++++------------ 5 files changed, 370 insertions(+), 124 deletions(-) diff --git a/2022/Dockerfile b/2022/Dockerfile index 3d9865b..4da7a0a 100644 --- a/2022/Dockerfile +++ b/2022/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive -# Install Maya +# maya 2022 RUN apt-get update && apt-get install -y alien wget \ && wget --no-check-certificate -O maya.tgz https://efulfillment.autodesk.com/NetSWDLD/2022/MAYA/7AA0A333-D72A-3C65-AB0F-0FE0F802014A/ESD/Autodesk_Maya_2022_ML_Linux_64bit.tgz \ && mkdir maya \ @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y alien wget \ && ln -s /usr/autodesk/maya/bin/mayapy /usr/autodesk/maya/bin/python \ && apt-get purge -y alien wget +# libxp6 RUN apt-get update \ && apt-get install -y software-properties-common \ && add-apt-repository -y ppa:zeehio/libxp || add-apt-repository -y ppa:zeehio/libxp \ @@ -25,31 +26,23 @@ RUN apt-get update \ && add-apt-repository --remove ppa:zeehio/libxp \ && apt-get purge -y software-properties-common -RUN apt-get update && apt-get install -y \ - # Utils - wget \ - git \ - # Maya requirements - libgl1 \ - libxkbcommon0 \ - libglu1-mesa \ - libxinerama1 \ - libxmu6 \ - libxi6 \ - libjpeg62 \ - libnss3 \ - libxcomposite1 \ - libxdamage1 \ - libxrender1 \ - libxrandr2 \ - libxcursor1 \ - libxtst6 \ - libasound2 \ - libcg +# libpng15 +RUN apt-get update \ + && apt-get install -y wget zlib1g-dev \ + && wget -O libpng15.tgz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz \ + && tar -xvf libpng15.tgz \ + && rm libpng15.tgz \ + && cd libpng-1.5.15 \ + && ./configure --prefix=/usr/local/libpng \ + && make install \ + && cd ../ \ + && rm -r libpng-1.5.15 \ + && ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15 \ + && apt-get purge -y wget zlib1g-dev -# Install libssl.so.10 for Maya and Python +# libssl RUN apt-get update \ - && apt-get install -y alien \ + && apt-get install -y alien wget \ && wget -O libssl1.1.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb \ && dpkg -i libssl1.1.deb \ && rm libssl1.1.deb \ @@ -60,23 +53,73 @@ RUN apt-get update \ && rm compat-openssl10*.deb \ && ln -s /lib64/libssl.so.10 /lib/x86_64-linux-gnu/libssl.so.10 \ && ln -s /lib64/libcrypto.so.10 /lib/x86_64-linux-gnu/libcrypto.so.10 \ - && apt-get purge -y alien + && apt-get purge -y alien wget -RUN wget -O libpng15.tgz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz \ - && tar -xvf libpng15.tgz \ - && rm libpng15.tgz \ - && cd libpng-1.5.15 \ - && apt-get install -y zlib1g-dev \ - && ./configure --prefix=/usr/local/libpng \ - && make install \ - && cd ../ \ - && rm -r libpng-1.5.15 \ - && ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15 +RUN apt-get update && apt-get install -y \ + # Utils + wget \ + git \ + # Additional required Linux libraries for Maya + libc6 \ + libsm6 \ + libice6 \ + zlib1g \ + openssl \ + libnss3 \ + dbus \ + libpcre16-3 \ + libglu1-mesa \ + libglw1-mesa \ + gamin \ + libaudiofile-dev \ + e2fsprogs \ + libcap2 \ + libdrm2 \ + libmng2 \ + flite \ + speech-dispatcher \ + cups \ + libxau6 \ + libxcomposite1 \ + libxcursor1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxmu6 \ + libxrandr2 \ + libxrender1 \ + libxss1 \ + libxshmfence1 \ + libxt6 \ + libxtst6 \ + libxinerama1 \ + libxcb1 \ + libxcb-util1 \ + libxcb-ewmh2 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-render-util0 \ + libxkbcommon0 \ + libxkbcommon-x11-0 \ + libx11-6 \ + # Additional required packages for running Maya on Ubuntu + libfam0 \ + libcurl4 \ + libjpeg62 \ + libxm4 \ + libxcb-xinerama0 \ + libxdamage1 + +# libffi6 +RUN wget -O libffi6.deb http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb \ + && dpkg -i libffi6.deb \ + && rm libffi6.deb RUN mkdir -p /usr/tmp && chmod 777 /usr/tmp \ && mkdir -p ~/.cache/pip && chmod 777 ~/.cache/pip \ && mkdir -p /usr/tmp/runtime-root && chmod 777 /usr/tmp/runtime-root ENV XDG_RUNTIME_DIR=/usr/tmp/runtime-root - ENV PATH=/usr/autodesk/maya/bin:$PATH +ENV MAYA_NO_STANDALONE_ATEXIT=1 +ENV MAYA_DISABLE_ADP=1 diff --git a/2023/Dockerfile b/2023/Dockerfile index 0f6e983..0d34873 100644 --- a/2023/Dockerfile +++ b/2023/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive -# Install Maya +# maya 2023 RUN apt-get update && apt-get install -y alien wget \ && wget --no-check-certificate -O maya.tgz https://efulfillment.autodesk.com/NetSWDLD/2023/MAYA/5EC03A3E-DC11-3DF4-B675-4504BA04FF0C/ESD/Autodesk_Maya_2023_ML_Linux_64bit.tgz \ && mkdir maya \ @@ -15,8 +15,10 @@ RUN apt-get update && apt-get install -y alien wget \ && rm -r maya \ && rm -r /usr/autodesk/maya/Examples \ && ln -s /usr/autodesk/maya/bin/mayapy /usr/autodesk/maya/bin/python \ + && ln -s /usr/autodesk/maya/lib/libfbxsdk-adsk.so /usr/lib/libfbxsdk-adsk.so \ && apt-get purge -y alien wget +# libxp6 RUN apt-get update \ && apt-get install -y software-properties-common \ && add-apt-repository -y ppa:zeehio/libxp || add-apt-repository -y ppa:zeehio/libxp \ @@ -25,44 +27,88 @@ RUN apt-get update \ && add-apt-repository --remove ppa:zeehio/libxp \ && apt-get purge -y software-properties-common +# libpng15 +RUN apt-get update \ + && apt-get install -y wget zlib1g-dev \ + && wget -O libpng15.tgz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz \ + && tar -xvf libpng15.tgz \ + && rm libpng15.tgz \ + && cd libpng-1.5.15 \ + && ./configure --prefix=/usr/local/libpng \ + && make install \ + && cd ../ \ + && rm -r libpng-1.5.15 \ + && ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15 \ + && apt-get purge -y wget zlib1g-dev + RUN apt-get update && apt-get install -y \ # Utils wget \ git \ - # Maya requirements - libgl1 \ - libxkbcommon0 \ - libglu1-mesa \ - libxinerama1 \ - libxmu6 \ - libxi6 \ - libjpeg62 \ + # Additional required Linux libraries for Maya + libc6 \ + libsm6 \ + libice6 \ + zlib1g \ + openssl \ libnss3 \ + dbus \ + lsb-core \ + libnsl2 \ + libpcre16-3 \ + libglu1-mesa \ + libglw1-mesa \ + gamin \ + libaudiofile-dev \ + e2fsprogs \ + libcap2 \ + libdrm2 \ + libmng2 \ + flite \ + speech-dispatcher \ + cups \ + libxau6 \ libxcomposite1 \ - libxdamage1 \ - libxrender1 \ - libxrandr2 \ - libasound2 \ - libcg \ - libglib2.0-0 \ libxcursor1 \ - libxtst6 + libxext6 \ + libxfixes3 \ + libxi6 \ + libxmu6 \ + libxrandr2 \ + libxrender1 \ + libxss1 \ + libxshmfence1 \ + libxt6 \ + libxtst6 \ + libxinerama1 \ + libxcb1 \ + libxcb-util1 \ + libxcb-ewmh2 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-render-util0 \ + libxkbcommon0 \ + libxkbcommon-x11-0 \ + libx11-6 \ + # Additional required packages for running Maya on Ubuntu + libfam0 \ + libcurl4 \ + libjpeg62 \ + libxm4 \ + libgdbm-compat4 \ + libxcb-xinerama0 \ + libxdamage1 -RUN wget -O libpng15.tgz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz \ - && tar -xvf libpng15.tgz \ - && rm libpng15.tgz \ - && cd libpng-1.5.15 \ - && apt-get install -y zlib1g-dev \ - && ./configure --prefix=/usr/local/libpng \ - && make install \ - && cd ../ \ - && rm -r libpng-1.5.15 \ - && ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15 +# libffi6 +RUN wget -O libffi6.deb http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb \ + && dpkg -i libffi6.deb \ + && rm libffi6.deb RUN mkdir -p /usr/tmp && chmod 777 /usr/tmp \ && mkdir -p ~/.cache/pip && chmod 777 ~/.cache/pip \ && mkdir -p /usr/tmp/runtime-root && chmod 777 /usr/tmp/runtime-root ENV XDG_RUNTIME_DIR=/usr/tmp/runtime-root - ENV PATH=/usr/autodesk/maya/bin:$PATH +ENV MAYA_NO_STANDALONE_ATEXIT=1 +ENV MAYA_DISABLE_ADP=1 diff --git a/2024/Dockerfile b/2024/Dockerfile index fd5c986..dc689e9 100644 --- a/2024/Dockerfile +++ b/2024/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive -# Install Maya +# maya 2024 RUN apt-get update && apt-get install -y alien wget \ && wget --no-check-certificate -O maya.tgz https://efulfillment.autodesk.com/NetSWDLD/2024/MAYA/537B71D7-A391-3E25-93C3-9967181B3F34/ESD/Autodesk_Maya_2024_Linux_64bit.tgz \ && mkdir maya \ @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y alien wget \ && ln -s /usr/autodesk/maya/bin/mayapy /usr/autodesk/maya/bin/python \ && apt-get purge -y alien wget +# libxp6 RUN apt-get update \ && apt-get install -y software-properties-common \ && add-apt-repository -y ppa:zeehio/libxp || add-apt-repository -y ppa:zeehio/libxp \ @@ -25,29 +26,83 @@ RUN apt-get update \ && add-apt-repository --remove ppa:zeehio/libxp \ && apt-get purge -y software-properties-common +# libpng15 +RUN apt-get update \ + && apt-get install -y wget zlib1g-dev \ + && wget -O libpng15.tgz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz \ + && tar -xvf libpng15.tgz \ + && rm libpng15.tgz \ + && cd libpng-1.5.15 \ + && ./configure --prefix=/usr/local/libpng \ + && make install \ + && cd ../ \ + && rm -r libpng-1.5.15 \ + && ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15 \ + && apt-get purge -y wget zlib1g-dev + RUN apt-get update && apt-get install -y \ # Utils wget \ git \ # Maya requirements - libgl1 \ - libglu1-mesa \ - libxkbcommon0 \ - libxinerama1 \ - libxmu6 \ - libxi6 \ - libjpeg62 \ + libc6 \ + libsm6 \ + libice6 \ + zlib1g \ + openssl \ libnss3 \ + dbus \ + lsb-core \ + libpcre16-3 \ + libglu1-mesa \ + libglw1-mesa \ + gamin \ + libaudiofile-dev \ + e2fsprogs \ + libcap2 \ + libdrm2 \ + libmng2 \ + flite \ + speech-dispatcher \ + cups \ + libxau6 \ libxcomposite1 \ - libxdamage1 \ - libxrender1 \ + libxcursor1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxmu6 \ libxrandr2 \ + libxrender1 \ + libxss1 \ + libxshmfence1 \ + libxt6 \ libxtst6 \ - libpci3 \ - libasound2 \ - && apt-get install libffi7 \ - && ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6 + libxinerama1 \ + libxcb1 \ + libxcb-util1 \ + libxcb-ewmh2 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-render-util0 \ + libxkbcommon0 \ + libxkbcommon-x11-0 \ + libx11-6 \ + # Additional required packages for running Maya on Ubuntu + libfam0 \ + libcurl4 \ + libjpeg62 \ + libxm4 \ + libgdbm-compat4 \ + libxcb-xinerama0 \ + libxdamage1 +# libffi6 +RUN wget -O libffi6.deb http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb \ + && dpkg -i libffi6.deb \ + && rm libffi6.deb + +# libssl RUN wget -O libssl1.1.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb \ && dpkg -i libssl1.1.deb \ && rm libssl1.1.deb @@ -57,5 +112,6 @@ RUN mkdir -p /usr/tmp && chmod 777 /usr/tmp \ && mkdir -p /usr/tmp/runtime-root && chmod 777 /usr/tmp/runtime-root ENV XDG_RUNTIME_DIR=/usr/tmp/runtime-root - ENV PATH=/usr/autodesk/maya/bin:$PATH +ENV MAYA_NO_STANDALONE_ATEXIT=1 +ENV MAYA_DISABLE_ADP=1 diff --git a/2025/Dockerfile b/2025/Dockerfile index e584020..f565477 100644 --- a/2025/Dockerfile +++ b/2025/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive -# Install Maya +# maya 2025 RUN apt-get update && apt-get install -y alien wget \ && wget --no-check-certificate -O maya.tgz https://efulfillment.autodesk.com/NetSWDLD/2025/MAYA/1AAEB4DA-FE7D-3C8A-A4F4-C217F55C55BA/ESD/Autodesk_Maya_2025_Linux_64bit.tgz \ && mkdir maya \ @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y alien wget \ && ln -s /usr/autodesk/maya/bin/mayapy /usr/autodesk/maya/bin/python \ && apt-get purge -y alien wget +# libxp6 RUN apt-get update \ && apt-get install -y software-properties-common \ && add-apt-repository -y ppa:zeehio/libxp || add-apt-repository -y ppa:zeehio/libxp \ @@ -25,35 +26,88 @@ RUN apt-get update \ && add-apt-repository --remove ppa:zeehio/libxp \ && apt-get purge -y software-properties-common +# libpng15 +RUN apt-get update \ + && apt-get install -y wget zlib1g-dev \ + && wget -O libpng15.tgz https://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.15/libpng-1.5.15.tar.gz \ + && tar -xvf libpng15.tgz \ + && rm libpng15.tgz \ + && cd libpng-1.5.15 \ + && ./configure --prefix=/usr/local/libpng \ + && make install \ + && cd ../ \ + && rm -r libpng-1.5.15 \ + && ln -s /usr/local/libpng/lib/libpng15.so.15 /usr/lib/libpng15.so.15 \ + && apt-get purge -y wget zlib1g-dev + RUN apt-get update && apt-get install -y \ # Utils wget \ git \ # Maya requirements - libgl1 \ - libopengl0 \ - libfreetype6 \ - libxkbcommon0 \ - libglu1-mesa \ - libtiff5 \ - libfontconfig1 \ - libxinerama1 \ - libxmu6 \ - libxpm4 \ - libxi6 \ - libjpeg62 \ - libegl1 \ + libc6 \ + libsm6 \ + libice6 \ + zlib1g \ + openssl \ libnss3 \ + dbus \ + # lsb-core \ + libpcre16-3 \ + libglu1-mesa \ + libglw1-mesa \ + gamin \ + libaudiofile-dev \ + e2fsprogs \ + libcap2 \ + libdrm2 \ + libmng2 \ + flite \ + # speech-dispatcher \ + # cups \ + libxau6 \ libxcomposite1 \ - libxdamage1 \ - libxrender1 \ + # libxcursor1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxmu6 \ libxrandr2 \ + libxrender1 \ + # libxss1 \ + libxshmfence1 \ + libxt6 \ libxtst6 \ + libxinerama1 \ + libxcb1 \ + libxcb-util1 \ + # libxcb-ewmh2 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-render-util0 \ + libxkbcommon0 \ + libxkbcommon-x11-0 \ + libx11-6 \ + # # Additional required packages for running Maya on Ubuntu + libfam0 \ + libcurl4 \ + libjpeg62 \ + libxm4 \ + libgdbm-compat4 \ + libmng2 \ + libxcb-cursor0 \ + libxcb-xinerama0 \ + libxdamage1 \ + libegl1 \ libpci3 \ - libasound2 \ - libxkbfile1 \ - libcg + libxkbfile1 + +# libffi6 +RUN wget -O libffi6.deb http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb \ + && dpkg -i libffi6.deb \ + && rm libffi6.deb +# libssl RUN wget -O libssl1.1.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb \ && dpkg -i libssl1.1.deb \ && rm libssl1.1.deb @@ -62,3 +116,5 @@ RUN mkdir -p /usr/tmp && chmod 777 /usr/tmp \ && mkdir -p ~/.cache/pip && chmod 777 ~/.cache/pip ENV PATH=/usr/autodesk/maya/bin:$PATH +ENV MAYA_NO_STANDALONE_ATEXIT=1 +ENV MAYA_DISABLE_ADP=1 diff --git a/README.md b/README.md index 138a589..431a2f3 100644 --- a/README.md +++ b/README.md @@ -21,30 +21,22 @@ Autodesk Maya images on `ubuntu:22.04`. Run in interactive mode. ```bash -docker run -it --rm tahv/mayapy:2025 +docker run -it --rm tahv/mayapy:latest ``` Start `mayapy` inside the container. ```python $ mayapy - -# Initialize maya in standalone mode -import maya.standalone -maya.standalone.initialize() - -# From here you can import maya packages -from maya import cmds -from maya.api import OpenMaya - -# Uninitialize maya before leaving -maya.standalone.uninitialize() -exit() +>>> import maya.standalone +>>> maya.standalone.initialize() +>>> from maya import cmds +>>> from maya.api import OpenMaya ``` ### As Github workflow -The following example uses the latest version of `tahv/mayapy`. +Use `tahv/mayapy` as your job `image`. ```yaml name: Mayapy @@ -56,14 +48,13 @@ jobs: name: Mayapy runs-on: ubuntu-latest container: - image: tahv/mayapy + image: tahv/mayapy:latest steps: - - uses: actions/checkout@v4 - - name: Display Maya version + - name: Print Maya version run: mayapy -c "import maya.standalone; maya.standalone.initialize(); from maya import cmds; print(cmds.about(v=True))" ``` -The following example uses a matrix for the job to set multiple Maya versions. +Or use a matrix to run on multiple versions. ```yaml name: Mayapy @@ -77,12 +68,14 @@ jobs: strategy: matrix: maya-version: + - "2022" + - "2023" + - "2024" - "2025" container: image: tahv/mayapy:${{ matrix.maya-version }} steps: - - uses: actions/checkout@v4 - - name: Display Maya version + - name: Print Maya version run: mayapy -c "import maya.standalone; maya.standalone.initialize(); from maya import cmds; print(cmds.about(v=True))" ``` @@ -95,41 +88,93 @@ Pre-installed: - `git` - `wget` -`/usr/autodesk/maya/bin` is added to `PATH` and include the following: +`/usr/autodesk/maya/bin` is added to `PATH`, exposing: - `pip` (invoke it with `python -m pip`) - `mayapy` - `python` (symlink of `mayapy`) +### Installed libraries + +Additional libraries are installed following Autodesk documentation. + +- 2025: + [Required libraries](https://help.autodesk.com/view/MAYAUL/2025/ENU/?guid=GUID-D2B5433C-E0D2-421B-9BD8-24FED217FD7F); + [Installing on Ubuntu](https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/5ZZjP3R0R7hzPyhDYkd8IS.html). +- 2024: + [Required libraries](https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=GUID-D2B5433C-E0D2-421B-9BD8-24FED217FD7F); + [Installing on Ubuntu](https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/4EQDDcHqJbfBkQr3i0FrbQ.html). +- 2023: + [Required libraries](https://help.autodesk.com/view/MAYAUL/2023/ENU/?guid=GUID-D2B5433C-E0D2-421B-9BD8-24FED217FD7F); + [Installing on Ubuntu](https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/77DVRQ8wFRltRxWlSY4HVt.html). +- 2022: + [Required libraries](https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=GUID-D2B5433C-E0D2-421B-9BD8-24FED217FD7F); + [Installing on Ubuntu](https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/653FjR7SuamMJ5Y4v9XkXg.html). + + ### libxp6 -libxp6 is installed from [ppa:zeehio/libxp](https://launchpad.net/~zeehio/+archive/ubuntu/libxp) -as recommanded by Autodesk official [install instruction](https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/5ZZjP3R0R7hzPyhDYkd8IS.html). +`libxp6` is installed from [ppa:zeehio/libxp](https://launchpad.net/~zeehio/+archive/ubuntu/libxp) +as recommanded by [Autodesk](https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/5ZZjP3R0R7hzPyhDYkd8IS.html). -The archive has removed libxp6 because it is obsolete and the last built is on Ubuntu 22.04. +The archive has removed `libxp6` because it is obsolete and the last build is on Ubuntu 22.04. ### Removed directories -- `/usr/autodesk/maya/Examples` was removed to save ~1G space. +- `/usr/autodesk/maya/Examples` is removed from the images to save ~1G of space. + +### Exit code + +Maya will [set the exit code to 0](https://forums.autodesk.com/t5/maya-programming/wrong-exit-code-with-mayapy/td-p/8460077) +when standalone crashes. +All images set `MAYA_NO_STANDALONE_ATEXIT=1` to make maya return a non 0 exit code. + +### Disabling analytics + +All images set `MAYA_DISABLE_ADP=1` to opt-out of analytics +when starting Maya in batch mode, which can cause a hang on close. ## Development -Clone the repo, cd into it and build the image from one of the directories. +Clone the repo, cd into it and build an image from one of the directories. ```bash git clone https://github.com/tahv/docker-mayapy cd docker-mayapy docker build --platform linux/amd64 -t tahv/mayapy:2025 2025 +docker run -it --rm mayapy:2025 ``` +### Debugging + +> Debugging tips for creating new images, in no particular order. + List missing dependencies. ```bash ldd /usr/autodesk/maya/lib/* 2> /dev/null | sed -nE 's/\s*(.+) => not found/\1/p' | sort --unique ``` +Set this variable to make Qt print out diagnostic information +about each plugin it tries to load. + +```bash +export QT_DEBUG_PLUGINS=1 +``` + +Read Maya `ubuntu_README.txt` for information on how to fix potential versioning issues +with `libssl` and `libcrypto`. + +```bash +cat /usr/autodesk/maya/support/python/*/ubuntu_README.txt +``` + Initialize Maya and load plugins to catch missing dependencies. ```bash -mayapy -c "import maya.standalone; maya.standalone.initialize(); from maya import cmds; cmds.loadPlugin(a=True)" +mayapy -c "import maya.standalone; maya.standalone.initialize(); from maya import cmds; cmds.loadPlugin('fbxmaya'); cmds.loadPlugin(a=True)" ``` + +