hexagon logo

Has anyone tried creating a docker for Adams?

I want to install adams in docker container.
 
Any help would be appreciated.
  • Yes, I've done that. Only Linux.
    For the latest version of Adams (2022.1), base it on Rocky Linux 8. (This will be the installation for RedHat 8.4)
    I create a 'naked image with only the OS and Adams. Then remove all examples and documentation from the image. It will still be close to 15 GB.
    But then I flatten the image and it shrinks down to 5.7 GB. But this does is a raw installation without any run command. And flattening a container removes all environment variables from it and they need to be recreated in the final app.
     
    Then I create my app in another image that starts with "FROM msc_adams:rl_2022.1" and that adds the run command and the model files. (or you mount a drive with the model file, depending on your application).
     
    Eventually I plan on making this raw image to be published as official on Dockerhub, but we are quite a bit away from that yet.
     
     
    # usage: docker build --tag msc_adams:rh84_2022_1b -f Dockerfile_RL8 . --progress=plain
    ## then flatten this image with:
    # docker run msc_adams:rh84_2022_1b
    # docker ps -a # get the container ID for this container
    # docker export <container_ID> | docker import - msc_adams:rh84_2022_1
    # docker rmi -f msc_adams:rh84_2022_1b
    #
    FROM docker.io/rockylinux/rockylinux:8.4 AS rl8
    LABEL maintainer=jesper.slattengren@hexagon.com
    RUN dnf -y update &&\
      dnf install -y csh fontconfig-devel freeglut libpng libXext libXrender libSM libstdc++ unzip mesa-libGL mesa-libGLU xorg-x11-server-Xvfb net-tools &&\
      dnf clean all
     
    ENV FLEXLM_TIMEOUT 5000000
    ENV MSC_OS_PREF rhe79
     
    WORKDIR /src
     
    COPY ./adams_2022.1_linux64_rh8.4.bin /src/installer.bin
    COPY ./config.rec /src/config.rec
    RUN chmod u+x installer.bin &&\
      ./installer.bin --response-file config.rec --mode silent  &&\
       rm installer.bin config.rec  &&\
       cd /msc/Adams/2022_1_875404/  &&\
       rm -rf help/ &&\
       rm -rf */examples/ &&\
       rm -rf */*.cdb/ &&\
       chmod 777 /src && \
       cd /src
     
    ENV LIB_ARCH LX64
    ENV ADAMS_PATH_FOR_FMU /msc/Adams/2022_1_875404
     
    Note that I'm using the environment variable ADAMS_PATH_FOR_FMU to point to the installation. Not TOPDIR as that will be overwritten if you start the process with the msc script.
    Your final app should now
    1. recreate all the environment variables
    2. Start Adams with "$ADAMS_PATH_FOR_FMU/mdi -c ......."
    3. And of course handle the checkout of Adams license from your license server.
     
  • Thanks for sharing this! Any updates on publishing to Dockerhub?
  • No, little to many questions about licensing and rights for a published image.
    But if you contact me directly, we can discuss this based on specific needs.
  • I know this is old, but for anyone still interested I've been working on this. Check out adams_docker on github.
  • Also, if anyone want's to contribute to this, it would be great if someone added compilers to the images...