Skip to content

Conversation

@DavideBaroliUniLu
Copy link
Contributor

In this pull request, I create a docker container based on phusion image:0.9.19.
The docker-exec is use to launch the docker machine with X11 enable. For the structure of dockerfile separation I follow the FeNiCs one.
For any reference to docker, you can see "Containers for portable, productive and performant scientific computing" ([(http://arxiv.org/abs/1608.07573])

@DavideBaroliUniLu DavideBaroliUniLu changed the title installation using Docker vm installation using Docker Sep 21, 2016
Copy link
Collaborator

@mtezzele mtezzele left a comment

Choose a reason for hiding this comment

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

I am not used to docker. Can you provide a simple "how to use it", please?
Moreover we have to figure out why the linux tests are failing...

@@ -0,0 +1,2 @@
ls
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this file necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it is not necessary.
The only necessary is the Dockerfile in the two subfolder and the docker-exec.

# experience, namely; creating the user PyGeM, setting up the users
# environment and the default entry point and cmds.
#
# Authors:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove the list of authors. We do not follow this style and github easily shows the author of each file.

@@ -0,0 +1,50 @@
# Author Davide Baroli <davide.baroli@uni.lu>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove the list of authors. We do not follow this style and github easily shows the author of each file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For style ok.

@DavideBaroliUniLu
Copy link
Contributor Author

The dockerfile allows you to install a container with the environment and PyGeM as a virtual machine. So it aim is devote to distribute the code to everyone independently from the operator system of the local machine. It can be also used for installation on cluster.
How to use:

  1. build the container
    go in base folder
    docker build --tag=pygem-base:phusion .
    It compiles and creates the container, then you can push for instance on quay or dockerhub. (with a docker push)
    go to dev-env
    (pay attention on the first line of the file, "FROM " should be in accordance with the name of the base container )
    docker build --tag=pygem-dev-env:phusion .
    Again you can push on open pubblic (quay or dockerhub)
    Finally to run the image
    I put the docker-exec file ( it allows to use X11 - so the gui )
    ./docker-exec pygem-dev-env:phusion
    Then the user can easy use PyGeM without any "requirement" or difficulty in installation.
    In addition if you want to shared document/code with the container you can run
    docker run -v $pwd:/home/PyGeM/shared -ti pygem-dev-env:phusion

@mtezzele
Copy link
Collaborator

Ok thank you very much. It is a very useful PR. There is still the author in dockerfiles/base/Dockerfile file. When you are able to fix docker with travis I will merge. If you need help just ask.

@mtezzele
Copy link
Collaborator

It would be great if you could add the "how to use docker with pygem" in the readme file.

@DavideBaroliUniLu
Copy link
Contributor Author

DavideBaroliUniLu commented Sep 22, 2016

I am adding the docker build and run in .travis.ylm.
I am also pushing the image to
docker.io/pygemdocker/pygem--base:latest
docker.io/pygemdocker/pygem-env-base:latest
How to use docker with pygem with pre-compiled image?
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix docker.io/pygemdocker/pygem-env-base:latest
To share a folder that contain the geometry files or your code:
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD:/home/PyGeM/shared pygemdocker/pygem-env-base:latest

@DavideBaroliUniLu
Copy link
Contributor Author

DavideBaroliUniLu commented Sep 22, 2016

The travis compiles fine. But I am still pushing on docker.io the second container.
you can check the uploading in [https://cloud.docker.com/pygemdocker/repository/list]

@mtezzele
Copy link
Collaborator

What is the difference between the base container and the env-base?

Remember to remove the author in the base file.

In the travis file I think some code is replicated in the case of a linux machine. The docker image has everything we need to test the package right? So we do not have to install everything twice. Maybe an if statement for the osx case will fix it. Otherwise I just did not get docker entirely and I apologize :)

If you add the how to in the readme I will merge (I think the section Dependencies and installation will fit the purpose). Thanks!

@DavideBaroliUniLu
Copy link
Contributor Author

Base container consists of : pulling phusion (light version of ubuntu 16.04) and set the permission to user PyGeM.
Dev-Env depend on Base container and consist of : dependency library + PyGeM.
Can we specify multiple travis file ? One for classical installation based on conda and one for docker ( just pulling from a repository hosting on cloud as in deal.ii or fenics)? I push the dockerfiles since a developer can adapt them to his personal requirement.
If the user has win/mac/linux and install docker, then thanks to docker potentiality one has a virtual enviroment with all correct dependency and same performance of full installation.
The only issue is that it is impossible now to test "via travis" the build of docker machine.

@luca-heltai
Copy link

Actually, it could be possible to simply let travis build the docker machine, use it to do the testing, and then once building the docker and testing have passed, deploy the newly built docker image to docker-hub.

@mtezzele
Copy link
Collaborator

@DavideBaroliUniLu are you able to implement the suggestion of Luca?

@DavideBaroliUniLu
Copy link
Contributor Author

I am running the deployment with dockerhub at "[https://hub.docker.com/r/pygemdocker/pygem/]".
I add 2 modification to the travis.ylm file:

  • specification of library version
  • substitution of the docker building in travis.ylm by running one hosted on dockerhub.org.

@mtezzele
Copy link
Collaborator

I fixed 5 minutes ago the compatibility with the new version of python-occ. A rebase should fix it.

fsalmoir and others added 23 commits October 11, 2016 14:52
* # This is a combination of 4 commits.
# The first commit's message is:
tests added for gui init

# The 2nd commit message will be skipped:

#	tests added for gui init

# The 3rd commit message will be skipped:

#	test for the main part of gui code

# The 4th commit message will be skipped:

#	test for the main part of gui code

* trying to solve conflicts

* removed pillow from packages

* removed pillow from travis installation
mathLab#87)

changed the order of the points in the plot of bounding box
* More tests for radial and doc

* one more test for beckert
* improved performance in freeform (~25%)
* fixed bug and improved flexibility in unvhandler
* new write comparison in unv tests
@DavideBaroliUniLu
Copy link
Contributor Author

I perform both rebase with squash. Now it is pretty better.

@mtezzele
Copy link
Collaborator

I don't think you did. See here. You have to rebase with respect to the upstream/master. Ideally the rebase should has the following output: your branch (the yellow one) has to start from my last commit merged. Something like this should work: git rebase -i mathlab/master. See here for more details.

@DavideBaroliUniLu
Copy link
Contributor Author

You have right. I get your point.
I have only clean my branch history. But I have this error in rebase operation with respect to the master.
Could not apply 6640a29... write method in the RBFParameters class and tests.
I have also fetch it.
What i notice is : the log with pick is back with respect to one on matlab/master during the rebase opereation. Do you know how to solve it ?

@mtezzele
Copy link
Collaborator

The problem is that you have merged this branch with another one that is much older than yours. The rebase now produces conflicts. The ugly but effective way is to close this PR, then you have to open another PR with only one commit of the new files you added/edited in this PR. After this I will links the two PR in order to have some history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants