ukaea / paramak

Create parametric 3D fusion reactor CAD models
https://paramak.readthedocs.io/en/main/
37 stars 12 forks source link

Getting Cubit / Trelis into the CI #712

Open shimwell opened 3 years ago

shimwell commented 3 years ago

Currently we test about 99% of the code in the CI on github actions and circle CI but we are not able to test the Trelis scripts for making the faceted geometry.

This is because as far as I know there is no version (including the new free version) that can be downloaded from a URL without login to the website. Any suggestions appreciated here @GregVernon

Ideally the would be a public URL for Trelis download then we could incorporate it into the Dockerfiles that are used for CI

We have a dockerfile that makes use of locally downloaded installer files (.deb) but naturally we can't put these on the internet as that would be redistribution.

But here is the dockerfile that adds to the exisintg CI dockerfile for interest

FROM ukaea/paramak

# this section copies over the dagmc plugin for trelis, a public url can be made for this open source plugin
COPY trelis17.1_ubuntu18.04.tar.gz .
RUN mkdir -p /opt/Trelis-17.1/
RUN tar -xf trelis17.1_ubuntu18.04.tar.gz -C /opt/Trelis-17.1

#this command copies the locally downloaded trelis into the docker image but a wget command pointing to a public url would allow us to do this in the CI
COPY Trelis-17.1.0-Lin64.deb .
RUN dpkg -i Trelis-17.1.0-Lin64.deb

# this installs the dagmc plugin
RUN cd /opt/Trelis-17.1/bin && \
    ln -s plugins/svalinn/libdagmc.so . && \
    ln -s plugins/svalinn/libiGeom.so . && \
    ln -s plugins/svalinn/libmakeWatertight.so . && \
    ln -s plugins/svalinn/libmcnp2cad.so . && \
    ln -s plugins/svalinn/libMOAB.so . && \
    ln -s plugins/svalinn/libMOAB.so.5 .

# puts the path for trelis into the PATH env
ENV PATH=$PATH:/opt/Trelis-17.1/bin
GregVernon commented 3 years ago

There will very soon be Coreform Cubit downloads available from a public URL. We are actively working on this in our current sprint and hope to have this available at the end of this sprint (~10 more days) or the next.

shimwell commented 3 years ago

@GregVernon how is that sprint going, wondering if the public URL make it to the deliverables this round

GregVernon commented 3 years ago

Hi @Shimwell - the sprint went well! We're very close to having this, in fact, we could probably push this live if we wanted, but we're going to take another sprint to stress-test and run QA on the process.

Here's a screenshot of our staged website for downloads: image

shimwell commented 3 years ago

This is the most exciting news. Thanks for the update, the staged website looks perfect.

shimwell commented 3 years ago

Just to add there is some really nice work on the DAGMC repository where GitHub actions is being put to great use.

Automatically building the DAGMC plugin on multiple operating systems and versions of Trelis Cubit

The last successful GitHub action has a artifact that is the DAGMC plugin for Cubit 2020.2 https://github.com/svalinn/Trelis-plugin/actions/runs/576252484

Open URL for the Coreform Cubit could simplify this GitHub action and remove the need for various GitHub secrets that are used at the moment. The other thing that would simplify this plugin building is the SDK which is also a bit tricky to download on CI at the moment.

shimwell commented 3 years ago

Looks like cubit learn linux makes use of cent OS 7. https://coreform.com/products/downloads/

Currently we use Ubuntu so would prefer a .deb package

GregVernon commented 3 years ago

@Shimwell - our latest dev-builds are now coming off the pipelines with .deb packages. We're not perfect there yet, but we're making progress :)

shimwell commented 3 years ago

Thank Greg, I shall give them a go and thanks for letting me know. ps looking forward to your talk on Cubit Core Form and Python

shimwell commented 3 years ago

Just tried installing cubit deb package on Ubutunt 18.04 and got a seg fault so I shall try Ubuntu 20.04 and also some of the suggestions from the corefore forum Screenshot from 2021-04-04 00-37-08

But super to see progress is being made