File tree Expand file tree Collapse file tree 6 files changed +80
-1
lines changed
Expand file tree Collapse file tree 6 files changed +80
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ docker pull ithacafv/openfoam2506-muq2-pytorch
3+ docker run -ti -d --name foam2506 -v " ${PWD} " :/home/ofuser/app:rw ithacafv/openfoam2506-muq2-pytorch /bin/bash
4+ docker exec foam2506 /bin/bash -c " source /usr/lib/openfoam/openfoam2506/etc/bashrc; cd /home/ofuser/app; git config --global --add safe.directory /home/ofuser/app; source etc/bashrc; git submodule update --init; ./Allwclean; ./Allwmake -taumq"
Original file line number Diff line number Diff line change 1+ name : OF2506
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ build :
11+
12+ runs-on : ubuntu-latest
13+
14+ strategy :
15+ matrix :
16+ include :
17+ - name : " OpenFOAM 2506"
18+ install : " cd ."
19+ compile : ./.compileOF2506.sh
20+
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v1
24+ - name : install OF
25+ run : ${{ matrix.install}}
26+ - name : make
27+ run : ${{ matrix.compile}}
Original file line number Diff line number Diff line change 1313<a href =" https://www.codacy.com/gh/ithaca-fv/ITHACA-FV/dashboard?utm_source=github.com& ; utm_medium=referral& ; utm_content=ithaca-fv/ITHACA-FV& ; utm_campaign=Badge_Grade " >
1414<img alt =" Codacy Badge " src =" https://app.codacy.com/project/badge/Grade/f51e1de0fd7c42a6a0be13889cbd4b0e " >
1515</a >
16+ </p >
1617
1718### 0. Introduction
1819** ITHACA-FV** is an implementation in ** OpenFOAM** of several reduced order modelling techniques. ** ITHACA-FV** is designed for [ ** OpenFOAM v2412** ] ( https://www.openfoam.com/news/main-news/openfoam-v2412/ ) but it can be easily adapted also to other versions of OpenFOAM.
Original file line number Diff line number Diff line change 33 rm -f hello
44
55build :
6- docker build --build-arg myuser=$(shell whoami) --build-arg UID=$(id -u ) --build-arg GID=$(id -g ) -t ithacafv/openfoam2412 -f ./Dockerfile .
6+ docker build --build-arg myuser=$(shell whoami) --build-arg UID=$(id -u ) --build-arg GID=$(id -g ) -t ithacafv/openfoam2506-muq2-pytorch -f ./Dockerfile .
77
88run : build
99 xhost +" local:docker" && \
Original file line number Diff line number Diff line change 1+ # Start from the ubuntu Openfoam 2106 image
2+ FROM opencfd/openfoam-dev:2506
3+ USER root
4+ ARG PYTHON_VERSION=3.7
5+ ENV PATH="/root/miniconda3/bin:${PATH}"
6+
7+ RUN rm /etc/apt/sources.list.d/openfoam.list && \
8+ cp /etc/apt/sources.list /etc/apt/sources.list.backup && \
9+ grep -v -e "openfoam" /etc/apt/sources.list.backup > /etc/apt/sources.list && \
10+ echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
11+ apt-get update && \
12+ apt-get install -yy -q pwgen npm nodejs cmake git wget bzip2 unzip && \
13+ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
14+
15+ # Anaconda installing
16+ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
17+ bash Miniconda3-latest-Linux-x86_64.sh -b && \
18+ rm Miniconda3-latest-Linux-x86_64.sh && \
19+ . /root/miniconda3/etc/profile.d/conda.sh && \
20+ export PATH=/root/miniconda3/bin:$PATH && \
21+ wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.7.1%2Bcpu.zip && \
22+ unzip libtorch-cxx11-abi-shared-with-deps-2.7.1+cpu.zip && \
23+ rm libtorch-cxx11-abi-shared-with-deps-2.7.1+cpu.zip && \
24+ conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
25+ conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r && \
26+ conda install -y -c conda-forge muq cmake && \
27+ conda clean -y --all
28+ ENV TORCH_LIBRARIES=/libtorch
29+ ENV MUQ_LIBRARIES=/root/miniconda3
30+ RUN echo 'source /usr/lib/openfoam/openfoam2412/etc/bashrc' >> ~/.bashrc
31+
Original file line number Diff line number Diff line change 1+ ME =$(shell whoami)
2+ clean :
3+ rm -f hello
4+
5+ build :
6+ docker build --build-arg myuser=$(shell whoami) --build-arg UID=$(id -u ) --build-arg GID=$(id -g ) -t ithacafv/openfoam2506-muq2-pytorch -f ./Dockerfile .
7+
8+ run : build
9+ xhost +" local:docker" && \
10+ docker run -ti --rm \
11+ -v "${HOME} :/home/${ME}" \
12+ -e DISPLAY=${DISPLAY} \
13+ --security-opt seccomp=unconfined \
14+ ubuntu-apc
15+
16+
You can’t perform that action at this time.
0 commit comments