-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addressing docker comments #668
Conversation
@kkiesling @pshriwise @gonuke this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small comment from me. Nice cleanup of the housekeeping check!
|
||
source ${docker_env} | ||
|
||
rm -rf ${geant4_build_dir}/bld ${geant4_install_dir} | ||
mkdir -p ${geant4_build_dir}/bld | ||
cd ${geant4_build_dir} | ||
wget http://geant4.cern.ch/support/source/geant4.${geant4_version}.tar.gz | ||
wget https://geant4.cern.ch/support/source/geant4.${geant4_version}.tar.gz --no-check-certificate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #660 they mention verifying our file against a checksum. Where do we stand on adding that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not found any checksum for geant4 tarball :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could generate a checksum against the version we are pulling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense !
docker/Dockerfile
Outdated
# Get some pip packages | ||
RUN pip install cython sphinx | ||
RUN pip install cython |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was sphinx moved out of this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like anything having to do w/ housekeeping was moved to the housekeeping.sh file.
@@ -13,7 +13,6 @@ fi | |||
rm -rf ${dagmc_build_dir}/bld ${dagmc_install_dir} | |||
mkdir -p ${dagmc_build_dir}/bld | |||
cd ${dagmc_build_dir} | |||
#git clone https://github.com/svalinn/DAGMC -b develop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason these lines were commented is that they would normally be part of a DAGMC build script, but in this specific case, we get the DAGMC source code by copying it into the docker image, not cloning it from github.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljacobson64 is there any reason to leave this line in as a comment w/ justification or can we just remove it all together? (see here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, there are there just because the normal install DAGMC
procedure should include them. But in this case as we copy the DAGMC
from the PR (using Travis
) we don't need them.
If this is correct, I don't think they should be there:
Those scripts are dedicated for CI not to show people how to install DAGMC
.
It is probably a good idea to have a version of them somewhere to facilitate DAGMC
install but for me this is definitely not the place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree w/ this assessment @bam241. I think the lines here should be removed and if we want a docker to help users, we need to host that elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For maintainability purposes, I think it would be good to have some indication of why the source code already exists in this directory. (The current situation with just a commented git clone
line is also not very helpful.) Perhaps a comment line that says
# DAGMC source code already exists in this directory because it was copied into
# the docker image by travis.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand,
the line is left there to highlight that we don't need to copy DAGMC source, while we normally would in a standard installation process.
So the line is basically there for educational purposes...
Is that correct @ljacobson64 ?
I would definitely prefer to not mix purposes in those scripts. So if there are used for CI install and testing, I would remove the git clone line and add the comment at the head of the file.
@@ -29,4 +28,3 @@ cmake ../src -DMOAB_DIR=${moab_install_dir} \ | |||
make -j${jobs} | |||
make install | |||
cd | |||
#rm -rf ${dagmc_build_dir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dagmc_build_dir would normally be deleted after building DAGMC, but we need to keep it in this specific case in order to run the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My same question above applies here too- do you think it should be left in as a comment w/ an explanation or removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed with @kkiesling if this is commented without explanation it should not be part of the build.
I'd be happy to add them back with a line of explanation.
when you mean run the tests, do you mean run the test locally ?
Because we run the test in CI without those...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line can be deleted.
To answer @bam241's question: I do mean for running the tests in CI. The CI runs make test
in the DAGMC build directory, so the DAGMC build directory must exist in order to run the tests. See here: https://github.com/bam241/DAGMC/blob/fix_docker/docker/travis.tests.sh#L28
.travis.yml
Outdated
- env: UBUNTU_VERSION=18.04 COMPILER=clang HDF5_VERSION=1.10.4 MOAB_VERSION=develop | ||
if: type != pull_request | ||
- stage: housekeeping | ||
env: UBUNTU_VERSION=16.04 COMPILER=gcc HDF5_VERSION=1.10.4 MOAB_VERSION=5.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The housekeeping run should use 18.04
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oups this was not intended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no major comments. Thanks @bam241!
docker/Dockerfile
Outdated
# Get some pip packages | ||
RUN pip install cython sphinx | ||
RUN pip install cython |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like anything having to do w/ housekeeping was moved to the housekeeping.sh file.
@ljacobson64 to avoid having the housekeeping stuff everywhere and only used for 1 job in ubuntu 18.04. I moved |
docker/travis.housekeeping.sh
Outdated
@@ -18,6 +18,9 @@ if [ "${TRAVIS_REPO_SLUG}" == "svalinn/DAGMC" ] && \ | |||
fi | |||
fi | |||
|
|||
# install package for style check | |||
apt-get install astyle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we moving this to here?
@@ -19,7 +19,7 @@ cd ${dagmc_build_dir}/bld | |||
# If this is not a pull request, get files needed for regression tests | |||
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then | |||
cd src/make_watertight/tests | |||
wget ${MW_REG_TEST_MODELS_URL} -O mw_reg_test_files.tar.gz -o wget.out | |||
wget ${MW_REG_TEST_MODELS_URL} -O mw_reg_test_files.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment suggested streaming these to stderr
and stdout
- do we do this now? Or is that default behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding of the comment was the default behavior streams them to stderr
I'm ambivalent on the housekeeping changes. They may happen fairly often, which means a lot of |
I was thinking @ljacobson64 @kkiesling @pshriwise @gonuke
|
That kind of sounds like overkill. I'd rather just delete those 2 lines we were discussing |
Yes but I feel like it will clarify the purpose of everything. |
Would it make more sense if the |
@gonuke @kkiesling @ljacobson64 this should be ready for an around of review |
@ljacobson64 @kkiesling I think I am now satisfied with the way it looks. |
Should we test some of this by adding an automatic build to dockerhub? |
How does that work? |
You point dockerhub at a Dockerfile in a github repo and everytime that repo changes, it rebuilds the image. We have deployed it for
So far they have all been for images whose configuration is 100% defined in the dockerfile, so I don't know how it will behave for this image that requires scripts... |
@gonuke this seems like a good idea, will take a look at this |
I have something running here: https://hub.docker.com/repository/docker/svalinn/dagmc-ci-ubuntu-18.04/builds |
The dockerhub build is taking a long time.... probably not surprising |
Looks like it might have timed out... |
@gonuek if we want to do the automated one, we will probably need 2 dockerfiles one for each ubuntu version |
We could stop supporting 16.04 since it's 4 years old now |
Although in that case we may as well start supporting 20.04... |
@gonuke I think we will have problem.... |
I think the main problem is building geant4... that takes forever.... |
@ljacobson64 @gonuke I this I addressed your last comments :) |
3453826
to
e8a5e60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bam241
@ljacobson64 do you have any other comments ? |
Has the docker image on dockerhub already been updated? I'm curious about how the tests are passing if it hasn't. Unless the new docker image is the same as the old one despite having a new Dockerfile. |
Yes the docker container have been updated/pushed after last dockerfile change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank @bam241 - LGTM
This address comments from #660 about Docker.
I added something from me as well, see if I can separate the housekeeping jobs from the others... and that way simply the travis CI file