Run CATIA Simulation within TWC without opening the app: a Docker starter kit (Cameo Containerization)

Hello,

I recently created a post that shows how model simulations can be automated by containerization. I have made some improvements and updated the container, its more stable and secure now. 

If you've ever wanted to run a simulation configuration without opening Cameo (a nightly regression, a CI pipeline, or simply one repeatable command), I've put together a starter kit that does it in a Docker container:

https://gitlab.com/notesandnotches-group/notesandnotches-projects

WHAT IT DOES

The container logs into Teamwork Cloud, opens your project, runs a simulation configuration headlessly, and leaves the results on your machine: the simulation log, the output parameters, and any files your model writes.

GETTING STARTED (Linux, or Windows with WSL2, with Docker installed)

git clone https://gitlab.com/notesandnotches-group/notesandnotches-projects.git
cd notesandnotches-projects/msosa_container
(copy your MSOSA Linux installer, *_unix.sh, into this folder)
./build.sh -s
./simulate.sh
simulate.sh asks for your Teamwork Cloud server, user name, project, simulation configuration and license server, and can remember them for next time. It checks your setup, asks for your password (hidden as you type), and runs the simulation.

THREE WAYS TO RUN IT

  1. Interactively: ./simulate.sh
  2. From a config file: ./simulate.sh -f nightly.conf (only your password is asked)
  3. In GitLab CI: an included pipeline template runs simulations by hand, on a schedule, or when triggered, and keeps the results as downloadable artifacts

SAMPLE PROJECT INCLUDED

The repository includes a Validation Sample project. Upload it to your Teamwork Cloud and run its Regression_Test configuration. It generates Python code and pytest tests from the SysML model, so you can see the whole chain working: license, login, simulation and output files.

WHAT YOU NEED

An MSOSA / Cameo Linux installer and a FlexLM license
A Teamwork Cloud account with access to your project
Docker on Linux, or on Windows with WSL2