Skip to content

Conversation

@qingfengxia
Copy link
Collaborator

@qingfengxia qingfengxia commented Oct 22, 2020

3 commits
remove all outdated Dockerfiles (keep 1 in the future)
add Dockerfile and readme for PPP for openmc workflow
fix issue20 set a big ZERO_THRESHOLD for goemetry hash calc

Checklist

  • Source is rebased on latest upstream main so is mergeable automatically or easily merged even with confliction.
  • Title of this PR is meaningful: e.g. "fix issue missing file pppStartPipeline #8 geomPipeline.py -o does not work", not "fix geomPipeline.py"
  • Commit message is meaningful: git push origin +your_branch to squash some tiny fixes for CI failures
  • Give the maintainer the legal rights to change the open source license in the future (see wiki/Contribution.md) for details

@qingfengxia qingfengxia added the enhancement New feature or request label Oct 22, 2020
Copy link
Collaborator

@johnnonweiler johnnonweiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to remove the outdated docker files. There's a lot of stuff in the new docker file that I don't really know about, and the change to ZERO_THRESHOLD is probably good but it looks a bit suspicious. It might be worth talking through some of these changes.

docker/README.md Outdated

or drop to an interative bash shell, as ubuntu 20.04

```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may work on Windows with a X11 server

docker/README.md Outdated

NOTE: X11 forward is not working with root user, so do not add this `-e GRANT_SUDO=yes --user root `, perhaps caused by hardcoded absolute home path in `/home/jovyan/.Xauthority`

`-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -h $HOSTNAME -v $HOME/.Xauthority:/home/jovyan/.Xauthority`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explain why those magic options

docker/README.md Outdated
`-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -h $HOSTNAME -v $HOME/.Xauthority:/home/jovyan/.Xauthority`

https://medium.com/@l10nn/running-x11-applications-with-docker-75133178d090

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quickly test x11 fwd

docker/README.md Outdated

`docker run --rm -p 2222:22 -e GRANT_SUDO=yes --user root -it ppp_openmc bash ` then start the ssh server by `sudo service ssh start `

port mapping by `-p 2222:22`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more info

# build with the following command
# sudo docker build -f Dockerfile_ppp_openmc -t ppp_openmc . --no-cache
# build from github source seems possible to cache ( build without --no-cache) if start quickly enough
# use --no-cache if you know there is no error in this Dockerfile
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in release , save disk , otherwise hard to reclaim space back

@qingfengxia
Copy link
Collaborator Author

John, I will leave you to do the merge, to see if you have been assigned the previledge to do so

Copy link
Collaborator

@johnnonweiler johnnonweiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I find the improved comments helpful.


# why non-root user is needed, because jupyter base image is used, put all files in user home
# this environment is jupyter/minimal specific
# add apt option --no-recommended to
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment: # add apt option --no-recommended to

USER $NB_USER

###################### dependancies for openmc ###################
###################### dependencies for openmc, maob, dagmc ###################
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "maob" should be "moab"

###################
# consider to split the docker image from here
# copy data into docker image could be skipped and use volume map instead
# but host folder must be mapped to /mat_dir in the container
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two options given here, and what is actually being done is not completely clear. The documentation seems to suggest that the data is currently being included in the Docker file. In the readme file:

Since nuclear material (tendl-2019-hdf5) has been built in, there is no need to map host folder to container like this

However, it looks like the material is not currently being built in - the line cloning the data repository is commented out below.

@johnnonweiler johnnonweiler merged commit cd072fb into ukaea:main Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants