|
[Sponsors] |
November 8, 2021, 11:44 |
Implementation of git repos in Docker
|
#1 |
Member
Callum Guy
Join Date: Dec 2019
Location: Scotland
Posts: 44
Rep Power: 7 |
Hi All,
I use a number of third party git repositories for my OpenFOAM projects which in the past I have compiled directly on the HPC. Because of the ever increasing number of these I thought it would be perhaps better to creater a docker image that has everything already built and then just start new containers everytime I want to run something on the HPC. Firstly, does anyone already do this and how do you find it? Secondly could anyone offer some advice on the Dockerfile? I found the one from Robin over at CFD Engine (thanks Robin!): Code:
FROM ubuntu:focal ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y vim curl git sudo RUN useradd --user-group --create-home --shell /bin/bash foam ;\ echo "foam ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers RUN curl -s https://dl.openfoam.com/add-debian-repo.sh | bash ;\ apt-get install -y openfoam1912 openfoam1912-tutorials ;\ rm -rf /var/lib/apt/lists/* ;\ echo "source /usr/lib/openfoam/openfoam1912/etc/bashrc" >> ~foam/.bashrc ;\ echo "export OMPI_MCA_btl_vader_single_copy_mechanism=none" >> ~foam/.bashrc USER foam Code:
FROM ubuntu:focal ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y vim curl git sudo RUN useradd --user-group --create-home --shell /bin/bash foam ;\ echo "foam ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers RUN curl -s https://dl.openfoam.com/add-debian-repo.sh | bash ;\ apt-get install -y openfoam1912 openfoam1912-tutorials ;\ rm -rf /var/lib/apt/lists/* ;\ echo "source /usr/lib/openfoam/openfoam1912/etc/bashrc" >> ~foam/.bashrc ;\ echo "export OMPI_MCA_btl_vader_single_copy_mechanism=none" >> ~foam/.bashrc ;\ git clone <git-repository> ;\ cd <git repository> ;\ ./allwmake USER foam All the best, Callum |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ansys Installation on Docker Container | mohsen.shiea | ANSYS | 11 | March 14, 2024 12:18 |
OpenFoam in docker (gcc 6) vs. OpenFoam natively compiled (gcc 8.1.1) | Anouk | OpenFOAM Running, Solving & CFD | 0 | September 17, 2018 09:02 |
[OpenFOAM.com] Docker vs Not Docker v2 AND installing editors into Docker | u2berggeist | OpenFOAM Installation | 1 | July 10, 2018 03:58 |
[OpenFOAM.com] v1606+ Install pb with Docker on OSX El Capitan | BPich | OpenFOAM Installation | 3 | October 10, 2016 19:52 |
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker | rt08 | OpenFOAM Installation | 1 | February 28, 2016 20:00 |