Skip to content

Commit

Permalink
Merge branch 'main' into feat/cpython-featureflag
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinknair authored Jan 15, 2025
2 parents 0a01748 + c94c2b5 commit 8940a64
Show file tree
Hide file tree
Showing 7 changed files with 683 additions and 199 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/1042.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker and ci/cd change for 25R1
2 changes: 1 addition & 1 deletion doc/source/getting_started/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Launch Mechanical with this code:
.. code::
[email protected]
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
Expand Down
111 changes: 111 additions & 0 deletions docker/251/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
FROM ubuntu:20.04

ARG VERSION

# LABELS
LABEL description="Mechanical on Ubuntu"
LABEL email="[email protected]"

# 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"]
Loading

0 comments on commit 8940a64

Please sign in to comment.