|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Andrew Arnold
Join Date: Apr 2024
Posts: 10
Rep Power: 2 ![]() |
Hello,
I'm trying to use the following Dockerfile to install OpenFOAM, PyFoam, and swak4Foam, but I am getting stuck on this last request: Code:
FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive # based on https://github.com/jakobhaervig/openfoam-dockerfiles # Install essential packages and dependencies RUN apt update && \ apt install -y sudo software-properties-common wget curl nano git htop build-essential ca-certificates mercurial libboost-all-dev ssh ffmpeg python3 python3-pip # Add OpenFOAM repository and install OpenFOAM RUN wget -q -O - http://dl.openfoam.com/add-debian-repo.sh | bash && \ apt-get update && \ apt-get install -y openfoam-default # alternate versions found using openfoam####-default # Add user "foam" and give sudo privileges RUN useradd --user-group --create-home --shell /bin/bash foam && \ echo "foamALL=(ALL)NOPASSWD:ALL" >> /etc/sudoers # Source OpenFOAM and fix Docker MPI, set environment variables for foam user RUN echo "source/usr/lib/openfoam/openfoam/etc/bashrc" >> ~foam/.bashrc && \ echo "exportOMPI_MCA_btl_vader_single_copy_mechanism=none" >> ~foam/.bashrc && \ sed -i '/exportWM_PROJECT_USER_DIR=/cexportWM_PROJECT_USER_DIR="/data/foam-$WM_PROJECT_VERSION"' /usr/lib/openfoam/openfoam/etc/bashrc # Install pyFoam RUN pip3 install PyFoam RUN apt install -y unzip # Download and compile swak4Foam RUN hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam /opt/swak4Foam && \ cd /opt/swak4Foam && \ hg update develop && \ ./maintainanceScripts/compileRequirements.sh && \ ./AllwmakeAll # Change user to "foam" USER foam The output, from some arbitrary line, is the following: Code:
43.11 * Type make and make install: 43.11 to install to /opt/swak4Foam/privateRequirements as usual. 43.11 * Type make bootstrap: 43.11 to install LuaRocks into /opt/swak4Foam/privateRequirements as a rock. 43.11 43.11 mkdir -p "build" 43.11 mkdir -p .luarocks 43.11 cp ./build/config-5.3.lua .luarocks/config-5.3.lua 43.11 rm -f src/luarocks/core/hardcoded.lua 43.11 echo "#!/bin/sh" > luarocks 43.11 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks 43.11 echo 'LUAROCKS_SYSCONFDIR="/opt/swak4Foam/privateRequirements/etc/luarocks" LUA_PATH="/opt/swak4Foam/privateRequirements/compilation/luarocks-3.2.1/src/?.lua;;" exec "/opt/swak4Foam/privateRequirements/bin/lua" "/opt/swak4Foam/privateRequirements/compilation/luarocks-3.2.1/src/bin/luarocks" --project-tree="/opt/swak4Foam/privateRequirements/compilation/luarocks-3.2.1/lua_modules" "$@"' >> luarocks 43.11 chmod +rx ./luarocks 43.12 ./luarocks init 43.14 43.14 Initializing project 'luarocks-3.2.1' for Lua 5.3 ... 43.14 ----------------------------------------------------- 43.14 43.14 Checking your Lua installation ... 43.14 Adding entries to .gitignore ... 43.14 Preparing ./.luarocks/ ... 43.14 Wrote .luarocks/config-5.3.lua 43.14 Preparing ./lua_modules/ ... 43.14 ./luarocks already exists. Not overwriting it! 43.14 Preparing ./lua for version 5.3... 43.14 mkdir -p "/opt/swak4Foam/privateRequirements/etc/luarocks" 43.14 install -m 644 "build/config-5.3.lua" "/opt/swak4Foam/privateRequirements/etc/luarocks/config-5.3.lua" 43.14 ./luarocks make --tree="/opt/swak4Foam/privateRequirements" 43.16 43.57 No existing manifest. Attempting to rebuild... 43.58 luarocks 3.2.1-1 is now installed in /opt/swak4Foam/privateRequirements (license: MIT) 43.58 43.93 Installing https://luarocks.org/luaprompt-0.8-1.src.rock 44.29 Missing dependencies for luaprompt 0.8-1: 44.29 argparse (not installed) 44.29 44.29 luaprompt 0.8-1 depends on argparse (not installed) 44.29 Installing https://luarocks.org/argparse-0.7.1-1.src.rock 44.55 44.88 argparse 0.7.1-1 is now installed in /opt/swak4Foam/privateRequirements (license: MIT) 44.88 44.88 gcc -O2 -fPIC -I/opt/swak4Foam/privateRequirements/include -c prompt.c -o prompt.o -D_GNU_SOURCE -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY -DHAVE_IOCTL -DCOMPLETE_KEYWORDS -DCOMPLETE_TABLE_KEYS -DCOMPLETE_METATABLE_KEYS -DCOMPLETE_FILE_NAMES -DCOMPLETE_MODULES -DSAVE_RESULTS -DRESULTS_TABLE_NAME="_" -I/usr/include -I/usr/include 44.88 gcc -O2 -fPIC -I/opt/swak4Foam/privateRequirements/include -c module.c -o module.o -D_GNU_SOURCE -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY -DHAVE_IOCTL -DCOMPLETE_KEYWORDS -DCOMPLETE_TABLE_KEYS -DCOMPLETE_METATABLE_KEYS -DCOMPLETE_FILE_NAMES -DCOMPLETE_MODULES -DSAVE_RESULTS -DRESULTS_TABLE_NAME="_" -I/usr/include -I/usr/include 44.88 gcc -shared -o prompt.so prompt.o module.o -L/usr/lib/aarch64-linux-gnu -L/usr/lib/aarch64-linux-gnu -Wl,-rpath,/usr/lib/aarch64-linux-gnu -Wl,-rpath,/usr/lib/aarch64-linux-gnu -lreadline -lhistory 44.91 luaprompt 0.8-1 is now installed in /opt/swak4Foam/privateRequirements (license: MIT/X11) 44.91 44.91 If there were problems during compilation install the readline-devel package (name may be different on platforms) 44.91 Lua successfully compiled 44.91 44.91 Add /opt/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically 44.91 44.91 44.91 This script is rather crude. If it doesn't work try the steps by hand. And be sure to run it from the root of the swak-installation (as ./maintainanceScripts/compileRequirements.sh). Otherwise it probably won't work 44.91 44.91 Bison already installed/compiled 44.91 Bison successfully compiled 44.91 Lua already installed/compiled 44.91 Lua successfully compiled 44.91 44.91 Add /opt/swak4Foam/privateRequirements/bin to PATH-variable. The ./Allwmake-script will use this directory automatically 44.91 44.91 Using automatic swakConfiguration because none is there 44.91 44.91 Environment variable WM_PROJECT_VERSION unset 44.91 This means that no OpenFOAM version is actived 44.91 Please activate the OF for which you want to compile swak4Foam Thank you! |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam Case crashes using swak4Foam | Miguel.Mendez | Main CFD Forum | 2 | March 23, 2021 23:42 |
[swak4Foam] swak4foam 0.4.2, groovyBC parallel diverging, openfoam extend 4.0 | Kombinator | OpenFOAM Community Contributions | 4 | November 24, 2020 08:42 |
source term in near wall cell | rajcfd | OpenFOAM Pre-Processing | 5 | February 1, 2016 10:31 |
[swak4Foam] Install swak4Foam on OpenFOAM1.7.1 on Ubuntu 13.04 | kobayashi | OpenFOAM Community Contributions | 2 | January 5, 2014 17:33 |
[swak4Foam] fails in parallel with -otherTime? | Phicau | OpenFOAM Community Contributions | 3 | June 26, 2013 13:00 |