Hi dokken.
It works, thanks a lot!
So, one has to hack directly the Ubuntu system, that is: one manually installs gmsh
into /usr/local
by downloading the latest version and extracting it into the latter directory. Then one sets 2 path variables and that’s it.
I’m still wondering why it doesn’t work with pip. Anyway …
Here is a small script which installs everything inside the container (could be useful). Just save this script as, e.g., Install.sh
and execute it by sh ./Install.sh
inside the container in the directory ~/shared
(the script should be placed inside the directory of the host system where the container has been started before).
# Update the Ubuntu system.
sudo apt update
sudo apt dist-upgrade -y
# Install h5py, lxml and python3-pip.
sudo apt install -y python3-h5py python3-lxml python-h5py python-lxml python3-pip
# Update pip.
sudo pip install --upgrade pip
# Install pygmsh and meshio.
sudo -H pip install pygmsh meshio
sudo -H pip3 install pygmsh meshio
# Install gmsh, latest version
sudo apt-get install -y wget libglu1 libxrender1 libxcursor-dev libxft-dev libxinerama-dev -y
cd /usr/local
sudo wget -nc http://gmsh.info/bin/Linux/gmsh-4.6.0-Linux64-sdk.tgz
sudo tar -xf gmsh-4.6.0-Linux64-sdk.tgz
sudo rm gmsh-4.6.0-Linux64-sdk.tgz
cd
# Set variables.
echo "export PYTHONPATH=/usr/local/gmsh-4.6.0-Linux64-sdk/lib:$PYTHONPATH" >> .profile
echo "export PATH=/usr/local/gmsh-4.6.0-Linux64-sdk/bin:$PATH" >> .profile
echo "export PYTHONPATH=/usr/local/gmsh-4.6.0-Linux64-sdk/lib:$PYTHONPATH" >> .bashrc
echo "export PATH=/usr/local/gmsh-4.6.0-Linux64-sdk/bin:$PATH" >> .bashrc
# Replace 'webagg' with 'tkagg'.
sed -i 's/backend: webagg/backend: tkagg/g' .config/matplotlib/matplotlibrc
# Then, make some alias commands.
echo "alias dir='ls -al'" >> .bash_aliases