From c94c2b57b7c1a2b6e52c3c0164624e354c32ea8d Mon Sep 17 00:00:00 2001 From: Dipin <26918585+dipinknair@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:30:12 -0600 Subject: [PATCH] FEAT: docker and ci/cd change for 25R1 (#1042) Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Kerry McAdams <58492561+klmcadams@users.noreply.github.com> --- .github/workflows/ci_cd.yml | 6 +- doc/changelog.d/1042.added.md | 1 + doc/source/getting_started/docker.rst | 2 +- docker/251/Dockerfile | 111 ++++++++ docker/251/dockerignore | 370 ++++++++++++++++++++++++++ docker/docker-compose.yml | 116 ++++---- docker/make_container.rst | 276 +++++++++---------- 7 files changed, 683 insertions(+), 199 deletions(-) create mode 100644 doc/changelog.d/1042.added.md create mode 100644 docker/251/Dockerfile create mode 100644 docker/251/dockerignore diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 735a64271..ecf7afd3a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -13,7 +13,7 @@ on: - '241' - '232' description: 'The Mechanical revision number to run tests on.' - default: '242' #stable version is 242, must match $stable_container + default: '251' #stable version is 251, must match $stable_container schedule: - cron: '00 22 * * *' # UTC time, may start 5-15 mins later than scheduled time # registry_package: @@ -37,7 +37,7 @@ env: DOCUMENTATION_CNAME: mechanical.docs.pyansys.com MAIN_PYTHON_VERSION: '3.13' # DEV_REVN & its Docker image are used in scheduled or registry package runs - STABLE_REVN: '242' + STABLE_REVN: '251' DEV_REVN: '252' LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} @@ -172,7 +172,7 @@ jobs: run: | # if a tag(release) is pushed, test all versions if ${{ github.event_name == 'push' }} && ${{ contains(github.ref, 'refs/tags') }}; then - echo "matrix={\"mechanical-version\":['23.2.0', '24.1.0', '24.2.0'],\"experimental\":[false]}" >> $GITHUB_OUTPUT + echo "matrix={\"mechanical-version\":['23.2.0', '24.1.0', '24.2.0', '25.1.0'],\"experimental\":[false]}" >> $GITHUB_OUTPUT else echo "matrix={\"mechanical-version\":['${{ needs.revn-variations.outputs.test_docker_image_version }}'],\"experimental\":[false]}" >> $GITHUB_OUTPUT fi diff --git a/doc/changelog.d/1042.added.md b/doc/changelog.d/1042.added.md new file mode 100644 index 000000000..191f1e201 --- /dev/null +++ b/doc/changelog.d/1042.added.md @@ -0,0 +1 @@ +docker and ci/cd change for 25R1 \ No newline at end of file diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index cf696fbbd..659106915 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -53,7 +53,7 @@ Launch Mechanical with this code: .. code:: LICENSE_SERVER=1055@XXX.XXX.XXX.XXX - VERSION=v24.2.0 + VERSION=v25.1.0 IMAGE=ghcr.io/ansys/pymechanical/mechanical:$VERSION docker run -e ANSYSLMD_LICENSE_FILE=$LICENSE_SERVER -p ip:10000:10000 $IMAGE diff --git a/docker/251/Dockerfile b/docker/251/Dockerfile new file mode 100644 index 000000000..95efe8fc4 --- /dev/null +++ b/docker/251/Dockerfile @@ -0,0 +1,111 @@ +FROM ubuntu:20.04 + +ARG VERSION + +# LABELS +LABEL description="Mechanical on Ubuntu" +LABEL email="pyansys.core@ansys.com" + +# OCI LABELS +LABEL org.opencontainers.image.documentation="https://mechanical.docs.pyansys.com" + +RUN apt-get update && apt-get install -y \ + libxt6 \ + libsm6 \ + libice6 \ + libx11-6 \ + libx11-xcb1 \ + libxext6 \ + openssl \ + openssh-client \ + libcairo2 \ + elfutils \ + expat \ + fontconfig \ + libglib2.0-0 \ + libc-bin \ + libc6 \ + jbigkit-bin \ + libxau6 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxfixes3 \ + libxrender1 \ + libxxf86vm1 \ + libxi6 \ + libdrm-common \ + libdrm2 \ + libjpeg-turbo8 \ + libselinux1 \ + libtiff5 \ + libxcb1 \ + libxshmfence1 \ + libglx-mesa0 \ + libosmesa6 \ + libgl1 \ + libgl1-mesa-dri \ + libgl1-mesa-glx \ + libglu1 \ + libglu1-mesa \ + libegl1-mesa \ + libglapi-mesa \ + libpcre2-8-0 \ + libpixman-1-0 \ + libmotif-common \ + libxm4 \ + libgfortran4 \ + libgfortran5 \ + xvfb \ + tini \ + ca-certificates \ + libgomp1 \ + libtirpc3 \ + locales \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && locale-gen en_US.UTF-8 \ + && locale-gen fr_FR.utf8 \ + && locale-gen de_DE.utf8 \ + && locale-gen ja_JP.utf8 \ + && locale-gen zh_CN.utf8 + +# Copying files +WORKDIR /install/ + +COPY . . + +# License server +# (Optional) +# ENV LICENSE_SERVER=111.222.333.444 +# ENV ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER + +ENV ANSYS_VERSION=${VERSION} \ + ANSYS${VERSION}_DIR=/install/ansys_inc/v${VERSION}/ansys \ + AWP_ROOT${VERSION}=/install/ansys_inc/v${VERSION} \ + CADOE_LIBDIR${VERSION}=/install/ansys_inc/v${VERSION}/commonfiles/Language/en-us \ + ANSYS_WORKBENCH_LOGGING=1 \ + ANSYS_WORKBENCH_LOGGING_FILTER_LEVEL=0 \ + ANSYS_WORKBENCH_LOGGING_AUTO_FLUSH=1 \ + ANSYS_WORKBENCH_LOGGING_CONSOLE=1 \ + ANSYS_WORKBENCH_LOGGING_DIRECTORY=/tmp \ + LANG=POSIX \ + # Ans.EDServices.MaterialCOM.dll dependencies + LD_LIBRARY_PATH=/install/ansys_inc/v${VERSION}/tp/IntelCompiler/2023.1.0/linx64:${LD_LIBRARY_PATH} \ + LD_LIBRARY_PATH=/install/ansys_inc/v${VERSION}/tp/qt/5.15.16//Linux64:${LD_LIBRARY_PATH} \ + #umpe dependencies for Ans.Post.UmpeCOM.dll + LD_LIBRARY_PATH=/install/ansys_inc/v${VERSION}/aisol/umpe/common/bin/linx64:${LD_LIBRARY_PATH} \ + LD_LIBRARY_PATH=/install/ansys_inc/v${VERSION}/tp/hdf5/1_12_2/linx64:${LD_LIBRARY_PATH} \ + # need to use EGL with this image's version of Mesa (version might be fine but I think the package was compiled with some flags set differently than what is required, causing offscreen renderings to only show the background blue-white gradient; need to use EGL to overcome it) + ANS_WB_FORCE_EGL=1 \ + MECHANICAL_ON_DOCKER=TRUE \ + OMPI_ALLOW_RUN_AS_ROOT=1 \ + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 + +# expose port for grpc +EXPOSE 10000 + +# Set working directory +WORKDIR /install/ansys_inc/v${VERSION}/aisol/ + +ENTRYPOINT ["tini", "--", "xvfb-run", "./.workbench", "-dsapplet", "-AppModeMech", "-b", "-grpc", "10000"] \ No newline at end of file diff --git a/docker/251/dockerignore b/docker/251/dockerignore new file mode 100644 index 000000000..e497fab6e --- /dev/null +++ b/docker/251/dockerignore @@ -0,0 +1,370 @@ +# combine files needed for mechanical and mapdl + +# ignore all .a files ( static libraries ) +**/*.a + +# ignore the .txt files +*.txt + +# ignore the log files +ansys_inc/*.log + +# ignore the license file +ansys_inc/shared_files/licensing/ansyslmd.ini + +ansys_inc/v251/ACP + +ansys_inc/v251/Addins +!ansys_inc/v251/Addins/ACT +!ansys_inc/v251/Addins/EngineeringData +!ansys_inc/v251/Addins/JobManager +!ansys_inc/v251/Addins/JobMgrAdapter +!ansys_inc/v251/Addins/Units + +ansys_inc/v251/aisol/BladeModeler +ansys_inc/v251/aisol/FEModeler + +ansys_inc/v251/aisol/dll/linx64/libans.blademodeler.ndfutilitiescom.so +ansys_inc/v251/aisol/dll/linx64/libans.blademodeler.bg41objectscom.so +ansys_inc/v251/aisol/dll/linx64/ans.blademodeler.bg41objectscom.rsb +ansys_inc/v251/aisol/dll/linx64/libans.blademodeler.tgproxycom.so +ansys_inc/v251/aisol/dll/linx64/ans.blademodeler.tgproxycom.rsb +ansys_inc/v251/aisol/dll/linx64/libans.blademodeler.objectscom.so +ansys_inc/v251/aisol/dll/linx64/ans.blademodeler.objectscom.rsb + +ansys_inc/v251/aisol/dll/linx64/libans.addins.parameshkernelcom.so +ansys_inc/v251/aisol/dll/linx64/ans.addins.parameshkernelcom.rsb +ansys_inc/v251/aisol/dll/linx64/libans.addins.parameshobjectscom.so +ansys_inc/v251/aisol/dll/linx64/ans.addins.parameshobjectscom.rsb + +ansys_inc/v251/Additive + +ansys_inc/v251/commonfiles/CAD/TechSoft3D +!ansys_inc/v251/commonfiles/CAD/TechSoft3D/HoopsExchange2024.6.0 + +ansys_inc/v251/commonfiles/CAD/Spatial +!ansys_inc/v251/commonfiles/CAD/Spatial/iop/linx64/code/bin/libtbbmalloc.so.2 + +ansys_inc/v251/commonfiles/CPython +!ansys_inc/v251/commonfiles/CPython/3_10 + +ansys_inc/v251/commonfiles/SystemCoupling + +ansys_inc/v251/commonfiles/Tcl +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libjpeg.so +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libpng.so +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libtiff.so +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libz.so + +ansys_inc/v251/commonfiles/CFX +!ansys_inc/v251/commonfiles/CFX/lib/linux-amd64/libans.cue.di.so +!ansys_inc/v251/commonfiles/CFX/lib/linux-amd64/libgfortran.so.5 +!ansys_inc/v251/commonfiles/CFX/lib/linux-amd64/libquadmath.so.0 +!ansys_inc/v251/commonfiles/CFX/lib/linux-amd64/libnsl.so.2 +!ansys_inc/v251/commonfiles/CFX/lib/linux-amd64/libnsl.so.2.0.0 +!ansys_inc/v251/commonfiles/CFX/tools/fluentio/linx64/lib/libfluentio.so +!ansys_inc/v251/commonfiles/CFX/tools/perl-5.34.3-dynamic/lib/5.34.3/x86_64-linux/CORE/libperl.so +!ansys_inc/v251/commonfiles/CFX/tools/poco-1.12.4/linx64/lib/libPocoFoundation.so +!ansys_inc/v251/commonfiles/CFX/tools/poco-1.12.4/linx64/lib/libPocoFoundation.so.94 + +ansys_inc/v251/commonfiles/Textures +ansys_inc/v251/commonfiles/tools +ansys_inc/v251/dcs +!ansys_inc/v251/dcs/nginx/auth_web/assets/favicon.ico + +ansys_inc/v251/Framework +!ansys_inc/v251/Framework/bin + +ansys_inc/v251/Images + +ansys_inc/v251/meshing + +ansys_inc/v251/RSM + +ansys_inc/v251/SystemCoupling + +ansys_inc/v251/ProductConfig.sh +ansys_inc/v251/ans_uninstall251 + +ansys_inc/v251/ansys +!ansys_inc/v251/ansys/syslib/ubuntu/libXp.so +!ansys_inc/v251/ansys/syslib/ubuntu/libXp.so.6 +!ansys_inc/v251/ansys/syslib/ubuntu/libXp.so.6.2.0 +!ansys_inc/v251/ansys/syslib/daal/libonedal_core.so +!ansys_inc/v251/ansys/syslib/daal/libonedal_core.so.1 +!ansys_inc/v251/ansys/syslib/daal/libonedal_core.so.1.1 +!ansys_inc/v251/ansys/syslib/daal/libonedal_thread.so +!ansys_inc/v251/ansys/syslib/daal/libonedal_thread.so.1 +!ansys_inc/v251/ansys/syslib/daal/libonedal_thread.so.1.1 +!ansys_inc/v251/ansys/syslib/daal/libtbb.so +!ansys_inc/v251/ansys/syslib/daal/libtbb.so.12 +!ansys_inc/v251/ansys/syslib/daal/libtbb.so.12.9 +!ansys_inc/v251/ansys/syslib/daal/libtbbmalloc.so +!ansys_inc/v251/ansys/syslib/daal/libtbbmalloc.so.2 +!ansys_inc/v251/ansys/syslib/daal/libtbbmalloc.so.2.9 +!ansys_inc/v251/ansys/syslib/openssl/libcrypto.so +!ansys_inc/v251/ansys/syslib/openssl/libcrypto-anss.so +!ansys_inc/v251/ansys/syslib/openssl/libcrypto-anss.so.3 +!ansys_inc/v251/ansys/syslib/openssl/libssl.so +!ansys_inc/v251/ansys/syslib/openssl/libssl-anss.so +!ansys_inc/v251/ansys/syslib/openssl/libssl-anss.so.3 + +!ansys_inc/v251/ansys/bin/mpitest +!ansys_inc/v251/ansys/bin/mpitest251 + +!ansys_inc/v251/ansys/lib/linx64/blas + +!ansys_inc/v251/aisol/lib/linx64/libgcc_s.so.1 +!ansys_inc/v251/aisol/lib/linx64/libaddress_sorting.so +!ansys_inc/v251/aisol/lib/linx64/libgpr.so +!ansys_inc/v251/aisol/lib/linx64/libgrpc.so +!ansys_inc/v251/ansys/apdl +!ansys_inc/v251/ansys/apdl/start.ans +!ansys_inc/v251/ansys/bin/ansset.ini +!ansys_inc/v251/ansys/bin/anssh.ini +!ansys_inc/v251/ansys/bin/ansys251 +!ansys_inc/v251/ansys/bin/ansupf +!ansys_inc/v251/ansys/bin/ansupf251 +!ansys_inc/v251/ansys/bin/ansysdis +!ansys_inc/v251/ansys/bin/ansysdis251 +!ansys_inc/v251/ansys/bin/linx64/ansys.e + +!ansys_inc/v251/ansys/bin/linx64/AnsMechSolverMesh.e +!ansys_inc/v251/ansys/bin/linx64/AnsMechSolverMesh_f.e +!ansys_inc/v251/ansys/bin/linx64/RunQMorph.e +!ansys_inc/v251/ansys/bin/linx64/RunQMorph_f.e + +!ansys_inc/v251/ansys/bin/linx64/lsdyna*.e + +!ansys_inc/v251/ansys/bin/mapdl +!ansys_inc/v251/ansys/docu/dynprompt251.ans +!ansys_inc/v251/ansys/gui/en-us/UIDL/MECHTOOL.AUI +!ansys_inc/v251/ansys/gui/en-us/UIDL/menulist.ans +!ansys_inc/v251/ansys/gui/en-us/UIDL/UIFUNC1.GRN +!ansys_inc/v251/ansys/gui/en-us/UIDL/UIFUNC2.GRN +!ansys_inc/v251/ansys/gui/en-us/UIDL/UIMENU.GRN + +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_A_min_max.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_A_param_a.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_A_param_b.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_keras2cpp_model_0.model +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_keras2cpp_model_1.model +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_keras2cpp_model_2.model +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_keras2cpp_model_3.model +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_keras2cpp_model_4.model +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_mean_0.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_mean_1.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_mean_2.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_mean_3.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_mean_4.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_scale_0.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_scale_1.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_scale_2.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_scale_3.txt +!ansys_inc/v251/ansys/lib/analytics/model_031323/sparse_memory_scale_4.txt + +!ansys_inc/v251/ansys/lib/linx64/libansUtils.so +!ansys_inc/v251/ansys/lib/linx64/libgeom_api.so +!ansys_inc/v251/ansys/lib/linx64/libami.so +!ansys_inc/v251/ansys/lib/linx64/libansexb.so +!ansys_inc/v251/ansys/lib/linx64/libansgil.so +!ansys_inc/v251/ansys/lib/linx64/libansGPU.so +!ansys_inc/v251/ansys/lib/linx64/libansHDF.so +!ansys_inc/v251/ansys/lib/linx64/libansMathUtils.so +!ansys_inc/v251/ansys/lib/linx64/libansMemManager.so +!ansys_inc/v251/ansys/lib/linx64/libansMETIS.so +!ansys_inc/v251/ansys/lib/linx64/libansMPI.so +!ansys_inc/v251/ansys/lib/linx64/libansMPIinterface.so +!ansys_inc/v251/ansys/lib/linx64/libansOpenMP.so +!ansys_inc/v251/ansys/lib/linx64/libansOpenSSL.so +!ansys_inc/v251/ansys/lib/linx64/libansParMETIS.so +!ansys_inc/v251/ansys/lib/linx64/libansPrintf.so +!ansys_inc/v251/ansys/lib/linx64/libansResourcePredict.so +!ansys_inc/v251/ansys/lib/linx64/libansScaLAPACK.so +!ansys_inc/v251/ansys/lib/linx64/libansuser.so +!ansys_inc/v251/ansys/lib/linx64/libansys.so +!ansys_inc/v251/ansys/lib/linx64/libansysb.so +!ansys_inc/v251/ansys/lib/linx64/libansysx.so +!ansys_inc/v251/ansys/lib/linx64/libboe.so +!ansys_inc/v251/ansys/lib/linx64/libApipWrapper.so +!ansys_inc/v251/ansys/lib/linx64/libcadoe_algorithms.so +!ansys_inc/v251/ansys/lib/linx64/libcdbtransformer.so +!ansys_inc/v251/ansys/lib/linx64/libcgns.so.4.3 +!ansys_inc/v251/ansys/lib/linx64/libchap.so +!ansys_inc/v251/ansys/lib/linx64/libcif.so +!ansys_inc/v251/ansys/lib/linx64/libCInterpolation.so +!ansys_inc/v251/ansys/lib/linx64/libCKernel.so +!ansys_inc/v251/ansys/lib/linx64/libCLegacy.so +!ansys_inc/v251/ansys/lib/linx64/libCMath.so +!ansys_inc/v251/ansys/lib/linx64/libCReaders.so +!ansys_inc/v251/ansys/lib/linx64/libCReadersExt.so +!ansys_inc/v251/ansys/lib/linx64/libdmumps.so +!ansys_inc/v251/ansys/lib/linx64/libdsp.so +!ansys_inc/v251/ansys/lib/linx64/libmnf.so +!ansys_inc/v251/ansys/lib/linx64/libmumps_common.so +!ansys_inc/v251/ansys/lib/linx64/liboctree-mesh.so +!ansys_inc/v251/ansys/lib/linx64/libPrimeMesh.so +!ansys_inc/v251/ansys/lib/linx64/libansBiolib.so +!ansys_inc/v251/ansys/lib/linx64/libqhull.so +!ansys_inc/v251/ansys/lib/linx64/libspooles.so +!ansys_inc/v251/ansys/lib/linx64/libtg.so +!ansys_inc/v251/ansys/lib/linx64/libvtk.so +!ansys_inc/v251/ansys/lib/linx64/libxox.so +!ansys_inc/v251/ansys/lib/linx64/libzmumps.so + +!ansys_inc/v251/ansys/lib/linx64/lapack/intel/libansLAPACK.so +!ansys_inc/v251/ansys/lib/linx64/lapack/amd/libansLAPACK.so + +!ansys_inc/v251/ansys/lib/linx64/mpi/intelmpi/libansMPI.so +!ansys_inc/v251/ansys/lib/linx64/mpi/intelmpi/libansScaLAPACK.so +!ansys_inc/v251/ansys/lib/linx64/mpi/openmpi/libansScaLAPACK.so +!ansys_inc/v251/ansys/lib/linx64/mpi/openmpi/libansMPI.so + +!ansys_inc/v251/ansys/site + +!ansys_inc/v251/ansys/syslib/AnsGil/libgmp.so +!ansys_inc/v251/ansys/syslib/AnsGil/libgmp.so.10 +!ansys_inc/v251/ansys/syslib/AnsGil/libgmp.so.10.3.2 +!ansys_inc/v251/ansys/syslib/AnsMechSolverMesh/libComponentSystem.so +!ansys_inc/v251/ansys/syslib/ansGRPC +!ansys_inc/v251/ansys/syslib/boost/libboost_atomic.so +!ansys_inc/v251/ansys/syslib/boost/libboost_atomic.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_atomic.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_atomic.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_chrono.so +!ansys_inc/v251/ansys/syslib/boost/libboost_chrono.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_chrono.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_chrono.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_date_time.so +!ansys_inc/v251/ansys/syslib/boost/libboost_date_time.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_date_time.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_date_time.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_filesystem.so +!ansys_inc/v251/ansys/syslib/boost/libboost_filesystem.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_filesystem.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_filesystem.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_log.so +!ansys_inc/v251/ansys/syslib/boost/libboost_log.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_log.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_log.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_log_setup.so +!ansys_inc/v251/ansys/syslib/boost/libboost_log_setup.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_log_setup.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_log_setup.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_program_options.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_regex.so +!ansys_inc/v251/ansys/syslib/boost/libboost_regex.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_regex.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_regex.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_system.so +!ansys_inc/v251/ansys/syslib/boost/libboost_system.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_system.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_system.so.1.71.0 +!ansys_inc/v251/ansys/syslib/boost/libboost_thread.so +!ansys_inc/v251/ansys/syslib/boost/libboost_thread.so.1 +!ansys_inc/v251/ansys/syslib/boost/libboost_thread.so.1.71 +!ansys_inc/v251/ansys/syslib/boost/libboost_thread.so.1.71.0 + +!ansys_inc/v251/ansys/syslib/daal/libdaal_core.so +!ansys_inc/v251/ansys/syslib/daal/libdaal_sequential.so +!ansys_inc/v251/ansys/syslib/daal/libdaal_thread.so +!ansys_inc/v251/ansys/syslib/daal/libtbb.so +!ansys_inc/v251/ansys/syslib/daal/libtbb.so.2 +!ansys_inc/v251/ansys/syslib/daal/libtbbmalloc.so +!ansys_inc/v251/ansys/syslib/daal/libtbbmalloc.so.2 + +!ansys_inc/v251/ansys/syslib/openssl/libcrypto.so +!ansys_inc/v251/ansys/syslib/openssl/libcrypto-anss.so +!ansys_inc/v251/ansys/syslib/openssl/libcrypto-anss.so.1.1 +!ansys_inc/v251/ansys/syslib/openssl/libssl.so +!ansys_inc/v251/ansys/syslib/openssl/libssl-anss.so +!ansys_inc/v251/ansys/syslib/openssl/libssl-anss.so.1.1 + +!ansys_inc/v251/ansys/syslib/zlib/libz.so +!ansys_inc/v251/ansys/syslib/zlib/libz.so.1 +!ansys_inc/v251/ansys/syslib/zlib/libz.so.1.2.13 + +ansys_inc/v251/commonfiles/MPI +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/bin/hydra_bstrap_proxy +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/bin/hydra_pmi_proxy +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/bin/mpiexec +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/bin/mpiexec.hydra +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/bin/mpirun +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/lib/release/libmpi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/lib/release/libmpi.so.12 +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/lib/release/libmpi.so.12.0 +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/lib/release/libmpi.so.12.0.0 +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/libfabric.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/libfabric.so.1 +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libefa-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libmlx-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libpsm3-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libpsmx2-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/librxm-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libshm-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libtcp-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libverbs-1.1-fi.so +!ansys_inc/v251/commonfiles/MPI/Intel/2021.11.0/linx64/libfabric/lib/prov/libverbs-1.12-fi.so + +ansys_inc/v251/commonfiles/Tcl +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libjpeg.so +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libpng.so +!ansys_inc/v251/commonfiles/Tcl/lib/linx64/libtiff.so + +ansys_inc/v251/tp/hdf5/1_12_2 +!ansys_inc/v251/tp/hdf5/1_12_2/linx64/lib/libhdf5_cpp-serial.so.200 +!ansys_inc/v251/tp/hdf5/1_12_2/linx64/lib/libhdf5_hl_cpp-serial.so.200 +!ansys_inc/v251/tp/hdf5/1_12_2/linx64/lib/libhdf5_hl-serial.so.200 +!ansys_inc/v251/tp/hdf5/1_12_2/linx64/lib/libhdf5-serial.so.200 + + +ansys_inc/v251/tp/IntelCompiler/2023.1.0 +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libcilkrts.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libcilkrts.so.5 +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libifcore.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libifcore.so.5 + +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libifcoremt.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libifcoremt.so.5 +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libifport.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libifport.so.5 +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libimf.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libintlc.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libintlc.so.5 +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libiomp5.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libirc.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libirng.so +!ansys_inc/v251/tp/IntelCompiler/2023.1.0/linx64/lib/intel64/libsvml.so + +ansys_inc/v251/tp/IntelMKL +ansys_inc/v251/tp/IntelMKL/2023.1.0 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_avx512.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_intelmpi_lp64.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_intelmpi_lp64.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_core.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_core.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_def.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_def.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_gnu_thread.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_gnu_thread.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_intel_lp64.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_intel_lp64.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_intel_thread.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_intel_thread.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_scalapack_lp64.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_scalapack_lp64.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_tbb_thread.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_tbb_thread.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_avx512.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_avx2.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_avx2.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_def.so.2 +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_openmpi_lp64.so +!ansys_inc/v251/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_openmpi_lp64.so.2 + +ansys_inc/v251/tp/qt +!ansys_inc/v251/tp/qt/5.15.17 + +ansys_inc/install.err +.dockerignore +Dockerfile diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 29f60309b..375c49152 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,58 +1,58 @@ -version: '3.3' - -# This is a docker-compose file that launches a remote Mechanical instance in a Dockerized environment. -# You can connect to this instance through port 10000. -# -# For the license, you need to provide the hostname of the license server. -# -# REQUIREMENTS: -# ============= -# -# - docker -# - docker images from ghcr.io (you might need to do 'docker login ghcr.io' first) -# -# USAGE: -# ====== -# -# 1. You need an environment variable named ANSYSLMD_LICENSE_FILE that points to the license server. For example: -# -# export ANSYSLMD_LICENSE_FILE=1055@mylicensehost -# -# 2. Run the following command: -# -# docker-compose up -# -# Optionally you can specify the '-d' flag for detaching mode. (The container will run in the background.) -# -# -# NOTES: -# ====== -# -# - The docker image is based on the Mechanical Ubuntu docker image from Ansys. -# - The entrypoint is defined in the Docker image. -# - If you need to run a license server, look at the 'docker-compose.license_server.yml' file. -# In that case, the command would be: -# -# docker-compose -f docker-compose.yml -f docker-compose.license_server.yml up -# -# -# - If you want to mount the local directory, add the 'volumes' section to the 'mechanical' service. -# -# volumes: -# - ./:/local -# - -services: - mechanical: - restart: always - shm_size: '8gb' - container_name: mechanical - mem_reservation: 8g - environment: - - ANSYSLMD_LICENSE_FILE=${ANSYSLMD_LICENSE_FILE} - ports: - - '10000:10000' - image: 'ghcr.io/ansys/mechanical:24.2.0' - user: "0:0" - # entrypoint: "/bin/bash tini -- xvfb-run ./.workbench -dsapplet -AppModeMech -b -grpc 10000" - +version: '3.3' + +# This is a docker-compose file that launches a remote Mechanical instance in a Dockerized environment. +# You can connect to this instance through port 10000. +# +# For the license, you need to provide the hostname of the license server. +# +# REQUIREMENTS: +# ============= +# +# - docker +# - docker images from ghcr.io (you might need to do 'docker login ghcr.io' first) +# +# USAGE: +# ====== +# +# 1. You need an environment variable named ANSYSLMD_LICENSE_FILE that points to the license server. For example: +# +# export ANSYSLMD_LICENSE_FILE=1055@mylicensehost +# +# 2. Run the following command: +# +# docker-compose up +# +# Optionally you can specify the '-d' flag for detaching mode. (The container will run in the background.) +# +# +# NOTES: +# ====== +# +# - The docker image is based on the Mechanical Ubuntu docker image from Ansys. +# - The entrypoint is defined in the Docker image. +# - If you need to run a license server, look at the 'docker-compose.license_server.yml' file. +# In that case, the command would be: +# +# docker-compose -f docker-compose.yml -f docker-compose.license_server.yml up +# +# +# - If you want to mount the local directory, add the 'volumes' section to the 'mechanical' service. +# +# volumes: +# - ./:/local +# + +services: + mechanical: + restart: always + shm_size: '8gb' + container_name: mechanical + mem_reservation: 8g + environment: + - ANSYSLMD_LICENSE_FILE=${ANSYSLMD_LICENSE_FILE} + ports: + - '10000:10000' + image: 'ghcr.io/ansys/mechanical:25.1.0' + user: "0:0" + # entrypoint: "/bin/bash tini -- xvfb-run ./.workbench -dsapplet -AppModeMech -b -grpc 10000" + diff --git a/docker/make_container.rst b/docker/make_container.rst index 0bb6a2dcc..5b80b04df 100644 --- a/docker/make_container.rst +++ b/docker/make_container.rst @@ -1,137 +1,139 @@ - -Create your own Mechanical Docker container -=========================================== - -.. warning:: You need a valid Ansys license and an Ansys account to - complete the steps in this section. - -You can create your own Mechanical Docker container following -the steps on this page. -These steps use a local Ubuntu machine to generate the needed -files for the Mechanical container by installing Ansys products first -and then copying the generated files to the container. - - -Requirements -============ - -* A Linux machine, preferable with Ubuntu 18.04 or later. - CentOS Linux distribution is no longer supported. - This machine needs to have `Docker `_ installed. - -* A valid Ansys account. Your Ansys reseller should have - provided you with an account. - -* These files are provided: - - * `Dockerfile `_ - * `.dockerignore `_ - - -Procedure -========= - -Download Mechanical installation files --------------------------------------------- - -Download the latest Mechanical version from the Ansys Customer Portal -(`Current Release `_). -You need to have a valid Ansys account with access to -the products to download. - -If you do not Ansys account information, contact your -IT manager. - - -Install Mechanical product --------------------------------- - -To install Mechanical product on an Ubuntu machine you can follow -`Install Mechanical `_ -if you are using the graphical user interface -or `Install Ansys products in WSL `_ -for the command line interface. The later approach can be reused with small changes in a -continuous integration workflow. - -To reduce the size of the final image, you might want to -install the minimal files by using: - -.. code:: bash - - sh /path-to-mechanical-installer \ - -silent -overwrite_preview -mechapdl -lsdyna \ - -install_dir /path-to-install-mechanical/ - - # example - # sh /home/username/download/linx/INSTALL \ - # -silent -overwrite_preview -mechapdl -lsdyna \ - # -install_dir /install/ansys_inc/ - - -Use ``sudo`` if you do not have write permissions in the installation directory. -The ``-mechapdl`` command installs Mechanical. - -Take note of where you are installing Ansys because the -directory path is need in the following section. - -Build Docker image ------------------- - -To build the Docker image, you must create a directory and copy -all the files you need in the image into this directory. - -The steps to copy these files and build the image are provided in the following script, -which you should modify to adapt it to your needs. - -.. code:: bash - - # Create env vars for the Dockerfile - export ANS_MAJOR_VERSION=23 - export ANS_MINOR_VERSION=1 - export ANS_VERSION=${ANS_MAJOR_VERSION}${ANS_MINOR_VERSION} - - export TAG=mechanical:${ANS_MAJOR_VERSION}.${ANS_MINOR_VERSION} - # example: if Mechanical v242 is installed under /install/ansys_inc/v242 - - # use /install for path_to_mechanical_installation - export MECHANICAL_INSTALL_LOCATION=/path_to_mechanical_installation/ - - # example: if pymechanical is cloned under /some_location/pymechanical - # use /some_location for path-to-pymechanical - export PYMECHANICAL_LOCATION=/path-to-pymechanical - - # Create working directory - cd ${MECHANICAL_INSTALL_LOCATION} - - # Copy the Docker files - cp ${PYMECHANICAL_LOCATION}/pymechanical/docker/${ANS_VERSION}/Dockerfile . - cp ${PYMECHANICAL_LOCATION}/pymechanical/docker/${ANS_VERSION}/.dockerignore . - - # Build Docker image - sudo docker build -t $TAG --build-arg VERSION=$ANS_VERSION . - -Take note of the these paths: - -* ``path-to-pymechanical`` is the path where PyMechanical repository is located. -* ``path_to_mechanical_installation`` is the path to where you have locally installed Mechanical. - -Not all installation files are copied. In fact, the files ignored during the copying -are described in the `.dockerignore file `_. - -The Docker container configuration needed to build the container is described in the -`Dockerfile `_. - - -Summary -======= - - -* **Step 1:** Download the latest Mechanical version from the Ansys Customer Portal - (`Current Release `_). - -* **Step 2:** Install Mechanical in a known folder. You can reuse your local - installation if it is updated and the machine is running the same Ubuntu - version as the target Ubuntu Docker version. - -* **Step 3:** Build the Docker image with the provided Docker configuration files - and script. + +Create your own Mechanical Docker container +=========================================== + +.. warning:: You need a valid Ansys license and an Ansys account to + complete the steps in this section. + +You can create your own Mechanical Docker container following +the steps on this page. +These steps use a local Ubuntu machine to generate the needed +files for the Mechanical container by installing Ansys products first +and then copying the generated files to the container. + + +Requirements +============ + +* A Linux machine, preferable with Ubuntu 20.04 or later. + CentOS Linux distribution is no longer supported. + This machine needs to have `Docker `_ installed. + +* A valid Ansys account. Your Ansys reseller should have + provided you with an account. + +* These files are provided: + + * `Dockerfile `_ + + * `.dockerignore `_ + + +Procedure +========= + +Download Mechanical installation files +-------------------------------------------- + +Download the latest Mechanical version from the Ansys Customer Portal +(`Current Release `_). +You need to have a valid Ansys account with access to +the products to download. + +If you do not Ansys account information, contact your +IT manager. + + +Install Mechanical product +-------------------------------- + +To install Mechanical product on an Ubuntu machine you can follow +`Install Mechanical `_ +if you are using the graphical user interface +or `Install Ansys products in WSL `_ +for the command line interface. The later approach can be reused with small changes in a +continuous integration workflow. + +To reduce the size of the final image, you might want to +install the minimal files by using: + +.. code:: bash + + sh /path-to-mechanical-installer \ + -silent -overwrite_preview -mechapdl -lsdyna \ + -install_dir /path-to-install-mechanical/ + + # example + # sh /home/username/download/linx/INSTALL \ + # -silent -overwrite_preview -mechapdl -lsdyna \ + # -install_dir /install/ansys_inc/ + + +Use ``sudo`` if you do not have write permissions in the installation directory. +The ``-mechapdl`` command installs Mechanical. + +Take note of where you are installing Ansys because the +directory path is need in the following section. + +Build Docker image +------------------ + +To build the Docker image, you must create a directory and copy +all the files you need in the image into this directory. + +The steps to copy these files and build the image are provided in the following script, +which you should modify to adapt it to your needs. + +.. code:: bash + + # Create env vars for the Dockerfile + export ANS_MAJOR_VERSION=25 + + export ANS_MINOR_VERSION=1 + export ANS_VERSION=${ANS_MAJOR_VERSION}${ANS_MINOR_VERSION} + + export TAG=mechanical:${ANS_MAJOR_VERSION}.${ANS_MINOR_VERSION} + # example: if Mechanical v251 is installed under /install/ansys_inc/v251 + + # use /install for path_to_mechanical_installation + export MECHANICAL_INSTALL_LOCATION=/path_to_mechanical_installation/ + + # example: if pymechanical is cloned under /some_location/pymechanical + # use /some_location for path-to-pymechanical + export PYMECHANICAL_LOCATION=/path-to-pymechanical + + # Create working directory + cd ${MECHANICAL_INSTALL_LOCATION} + + # Copy the Docker files + cp ${PYMECHANICAL_LOCATION}/pymechanical/docker/${ANS_VERSION}/Dockerfile . + cp ${PYMECHANICAL_LOCATION}/pymechanical/docker/${ANS_VERSION}/.dockerignore . + + # Build Docker image + sudo docker build -t $TAG --build-arg VERSION=$ANS_VERSION . + +Take note of the these paths: + +* ``path-to-pymechanical`` is the path where PyMechanical repository is located. +* ``path_to_mechanical_installation`` is the path to where you have locally installed Mechanical. + +Not all installation files are copied. In fact, the files ignored during the copying +are described in the `.dockerignore file `_. + +The Docker container configuration needed to build the container is described in the +`Dockerfile `_. + + +Summary +======= + + +* **Step 1:** Download the latest Mechanical version from the Ansys Customer Portal + (`Current Release `_). + +* **Step 2:** Install Mechanical in a known folder. You can reuse your local + installation if it is updated and the machine is running the same Ubuntu + version as the target Ubuntu Docker version. + +* **Step 3:** Build the Docker image with the provided Docker configuration files + and script.