mottosso / docker-maya

Dockerfile for Maya
MIT License
135 stars 17 forks source link

How to run a GUI version of Maya ? #4

Open tupipa opened 7 years ago

tupipa commented 7 years ago

Hi, I try to run Maya with GUI inside container.

I build the container and install maya with the .tgz ball downloaded from the official autodesk website.

Here is the Dockerfile and the way I run the containers: https://gist.github.com/tupipa/6c1443b043c090e75a766b6b114cf9ff

The setup GUI running inside Docker container showed installation was sucessful. But when I run maya, just nothing happens.

Could you help to find out what is missing in my settings?

Thanks

tupipa commented 7 years ago

The way I run container with GUI is docker run -it \ --net host \ -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v $(pwd)/root/workdir:/root/workdir \ --device /dev/snd \ -v /dev/shm:/dev/shm \ --name=maya \ tupipa/maya

It's based on this blog post: https://blog.jessfraz.com/post/docker-containers-on-the-desktop/

mottosso commented 7 years ago

Hey @tupipa, honestly I'm not sure as I've never tried this with Maya.

Have you tried something simpler, like glxgears? Odds are there are some underlying issues unrelated to Maya, and running this first would get you to the point where you can get an OpenGL window up on your local machine.

Also see this discussion: https://groups.google.com/forum/#!topic/docker-user/7w97EtTzZLU

willjp commented 6 years ago

Hey guys!

If it's helpful, I've been able to get maya-GUI to run within a docker container by installing the same family of video-drivers within the container as on the host-system (but I have not tested mayagui extensively, and I have only tested it using the mesa drivers)

This link was very helpful for me: http://gernotklingler.com/blog/howto-get-hardware-accelerated-opengl-support-docker/

host-system

os: Archlinux
video-driver-packages:
   - mesa
   - lib32-mesa

container

os:  Centos7.2   (latest officially supported by maya2017)
video-driver-packages:
   - mesa-libGLU
   - mesa-dri-drivers

You'll also want to install an X-server within the container. I might have gone a little overboard on the packages here, sorry:

maya dependencies:
   - libXp
   - libtiff
   - compat-libtiff3
   - libpng12
   - gamin
   - libXcomposite
   - libXinerama
   - libXrandr
   - libxslt
   - pulseaudio-libs
   - redhat-lsb
   - xorg-x11-fonts-ISO8859-1-100dpi
   - xorg-x11-fonts-ISO8859-1-75dpi
   - xorg-x11-fonts-75dpi
   - xorg-x11-fonts-100dpi

X11 dependencies:
   - xorg-x11-server-Xorg
   - xorg-x11-xauth

test your Xorg:
   - xeyes
   - glxgears

Docker Build Command

docker run                                   \
   --hostname dockermaya                     \
                                             \
   `# X11 sharing`                           \
   -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0:rw \
   -e DISPLAY=unix$DISPLAY                   \
   --device=/dev/dri:/dev/dri                \
                                             \
   `# maya-environment (thanks mottoso!!)`   \
   -e MAYA_DISABLE_CIP=1                     \
   -ti
willjp commented 6 years ago

Spent some more time playing around with nvidia binary drivers trying to get it to run but could not. Read the linked post more closely and Jess Frazelle mentioned that if using nvidia drivers, the version of the drivers must be the same on both the host and in the container.. which means likely running an older kernel, older drivers, older everything. Might as well be running a centos host...

I'm sorry, I was excited, but outside of intel integrated gpus, I was not very helpful in the end.

mottosso commented 6 years ago

Thanks @willjp, this was the conclusion I came to as well. Being on and supporting mostly Windows clients, it's a little prohibitive for me. :(

scroll commented 4 years ago

Sorry to re-raise this issue. Has anyone heard if this has improved in the recent years? I couldn't find new info on the topic.

mottosso commented 4 years ago

Not as of yet, however there appears to be light at end of the tunnel!

At the very least, this would enable running of remote-desktop software from within the container for working with e.g. Maya and any GPU-based application. Since it's local, there would be virtually no delay and no bandwidth limit compared to an actual remote desktop between your home and e.g. office.

Best case however you'd be able to run any windows x server like VcXsrv and stream both widgets and graphics to a local window for a near-native experience.

Once that's possible, I would ditch nearly all locally installed software in favour of having them in Docker containers. Imagine the ease of having all software in a container each, versioned and immediately available either publicly from Docker Hub or privately from your own container registry. Gamechanger.

mottosso commented 4 years ago

A few clicks into that link, is a section on running GUI apps from a container under WSL 2. :)

image

wongt commented 1 month ago

@tupipa Was wondering if you have managed to get it running? I'm observing in my setup when launching maya, the Authentication windows doesn't come up and times out preventing me to continue.

darkvertex commented 4 weeks ago

If you're attempting standalone licensing that prompts for an Autodesk login to get a license from the internet, there's a whole convoluted dance of commands involving .rpms from Autodesk, a .pit file and a version-specific "product key" to enable this mode on Linux (and it's only possible since Maya 2020+ FYI.)

See the explainer in this old forum post how I got it working with maya2020: https://forums.autodesk.com/t5/installation-licensing/maya-2019-linux-licensing-problems/m-p/9268313/highlight/true#M234679