solids4foam / solids4foam.github.io

solids4foam official website source files
http://solids4foam.github.io
MIT License
5 stars 13 forks source link

bashrc path updated on foam-extend-4.1 #49

Closed cloner0110 closed 8 months ago

cloner0110 commented 8 months ago

Hi @philipcardiff, this is now updated and works for FE4.1.

Although the change in dockerfile (https://github.com/solids4foam/solids4foam/pull/34/commits/39f4d79621821d5f7a9ff7f13dd8da84c1a85615) makes openFoam to compile for dockeruser, it still login as root instead of dockeruser.

anyway it's ok now and working.

cloner0110 commented 8 months ago

@philipcardiff I thought that we merged these commits e.g. https://github.com/solids4foam/solids4foam.github.io/pull/49/commits/12bbf3f1f910763619d9c0de010bcdc28983e25 and https://github.com/solids4foam/solids4foam.github.io/pull/49/commits/12bbf3f1f910763619d9c0de010bcdc28983e257 I don't know why they are still showing here !!

philipcardiff commented 8 months ago

Thanks @cloner0110, should I also merge https://github.com/solids4foam/solids4foam/pull/34?

cloner0110 commented 8 months ago

Hi @philipcardiff , currently for foam-extend-4.1, the command

docker run -it solids4foam/solids4foam-v2.0-foam-extend-4.1 /bin/bash

will run the image as dockeruser , also I can source bashrc with dockeruser as :

source /home/dockeruser/OpenFOAM/foam-extend-4.1/etc/bashrc; echo $?

which will return 0 as successful. Apparently, OpenFOAM is installed for dockeruser , but there is no solids4foam compiled for this user (which is actually what has been requested in https://github.com/solids4foam/solids4foam/pull/34 ) !

I don't have a proper access to docker on my Mac to verify this, but I think yes you should merge, it will change ownership to dockeruser which will solve the issue.

In case of not merging it now, we could explicitly mention that if they run with docker run or any alternatives, they will not have access to solids4foam to avoid confusions (temporarily) and then maybe I could re-write a new docker file scripts for all 3 version and make it consistent with docker run -it instead of docker start && docker attach.

cloner0110 commented 8 months ago

@philipcardiff, I just checked https://github.com/solids4foam/solids4foam/pull/34. It works correctly, and I think you can merge it.

I think a few modifications on the base image are needed in order to employ the same approach for v9.0 and v2012.

philipcardiff commented 8 months ago

Thanks @cloner0110; I have now merged https://github.com/solids4foam/solids4foam/pull/34.

If the instructions at https://www.solids4foam.com/installation/installWithDocker.html need to be updated for FE41, let me know.

cloner0110 commented 8 months ago

Great, @philipcardiff

We may change the whole start THEN attach approach to docker run, but now it will only work for foam extend docker image.

So, I suggest we keep things the way it is; later, we can first update the openfoam directories in the base image (for example, in Dockerfile.openfoam2012, OpenFOAM is installed on /usr/lib/openfoam and not in /home/dockeruser/openfoam ) and then change the instructions in the website to be consistent with docker run -it

philipcardiff commented 8 months ago

OK, sounds good.

I guess for a "normal" OpenFOAM OpenFOAM.com/org installation, OpenFOAM is typically installed centrally (e.g. /usr/lib/openfoam) but it is used/run by a user account rather than a root account. For foam-extend it is a bit different because we normally install it locally. So ideally the docker images can be run as a normal user and OpenFOAM/foam is installed in the typical location.

Having said that, I think it is OK the way it currently is so we can probably leave it for now :D

cloner0110 commented 8 months ago

@philipcardiff ok yes, we may leave it now :D