OpenCCG / openccg

OpenCCG library for parsing and realization with CCG
http://openccg.sourceforge.net/
Other
205 stars 45 forks source link

Any interest in a Docker image for the build? #23

Open lpmi-13 opened 5 years ago

lpmi-13 commented 5 years ago

After having some issues getting this to build (as I suspect others have also encountered), I attempted to put everything into a Dockerfile so that this problem only would need solving once.

I have just now realized that the current setup doesn't allow for a clean build only from the GitHub source and requires some files from the sourceforge repo.

So before I go any further with this, is there any interest in adding in a Dockerfile that grabs the compressed archive from sourceforge and just manually copies the necessary files into the lib folder of openccg prior to building with ant?

mwhite14850 commented 5 years ago

Hello Adam

That sounds like a nice contribution!

Mike

On Wed, Mar 13, 2019 at 5:16 PM Adam Leskis notifications@github.com wrote:

After having some issues getting this to build (as I suspect others have also encountered), I attempted to put everything into a Dockerfile so that this problem only would need solving once.

I have just now realized that the current setup doesn't allow for a clean build only from the GitHub source and requires some files from the sourceforge repo.

So before I go any further with this, is there any interest in adding in a Dockerfile that grabs the compressed archive from sourceforge and just manually copies the necessary files into the lib folder of openccg prior to building with ant?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenCCG/openccg/issues/23, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxvzd_FmyOdIyqcP0cVw3fyx5CR2ySYks5vWWqpgaJpZM4bwLy- .

chrzyki commented 5 years ago

Would love to have something like this as well and would be a great way of preserving the work being done here! Let me know if I can help in any way!

lpmi-13 commented 5 years ago

alright, great. Then I guess the next step is to clarify if there's any particular reason why the source for building those jar files isn't also in the github repository?

I'm assuming the logic is that asking people to additionally compile those from source felt like a bit too much to handle, though that would be an even better argument for a stable docker image.

I'll start working on a simple Dockerfile that pulls in the sourceforge stuff and see how I get on. Have got it all working locally, so will just try to replicate that. If we're unable to add in the source of the other jars for a full clean build, then we might want to use something like docker-compose to pull from a public dockerhub image (so the sourceforge stuff only needs downloading if the image is updated, which doesn't seem like it will be that frequent, vs downloading each time someone wants to build the docker container).

Ideally we have the complete source in one place, and then a docker build is much easier and straightforward, but I appreciate this might not be possible.

Oh, and I didn't actually get to the stage yet where I needed to do anything with python...was that for using the project to actually generate sentences? It was a bit unclear from the readme so just want to make sure that I've got all the bases covered.

shoeffner commented 5 years ago

I have a running version at https://github.com/shoeffner/web-openccg/blob/master/Dockerfile, though it does a little bit more and pulls in a specific archived version and grammar, but it might be a starting point.

On Thu, Mar 14, 2019, 22:40 Adam Leskis notifications@github.com wrote:

alright, great. Then I guess the next step is to clarify if there's any particular reason why the source for building those jar files isn't also in the github repository?

I'm assuming the logic is that asking people to additionally compile those from source felt like a bit too much to handle, though that would be an even better argument for a stable docker image.

I'll start working on a simple Dockerfile that pulls in the sourceforge stuff and see how I get on. Have got it all working locally, so will just try to replicate that. If we're unable to add in the source of the other jars for a full clean build, then we might want to use something like docker-compose to pull from a public dockerhub image (so the sourceforge stuff only needs downloading if the image is updated, which doesn't seem like it will be that frequent, vs downloading each time someone wants to build the docker container).

Ideally we have the complete source in one place, and then a docker build is much easier and straightforward, but I appreciate this might not be possible.

Oh, and I didn't actually get to the stage yet where I needed to do anything with python...was that for using the project to actually generate sentences? It was a bit unclear from the readme so just want to make sure that I've got all the bases covered.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenCCG/openccg/issues/23#issuecomment-473075307, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwHD6cbaiEVUvJ55NK0QpZIGYrDYsyNks5vWsHAgaJpZM4bwLy- .

mwhite14850 commented 5 years ago

Since the beginning, openccg has always been distributed with just the jar files for external libraries, which used to be more common. I don’t think anyone has ever tried getting all the sources together.

Python scripts are used in a few places to do various data format adjustments when chaining together tools for broad coverage parsing and realization.

On Thu, Mar 14, 2019 at 5:40 PM Adam Leskis notifications@github.com wrote:

alright, great. Then I guess the next step is to clarify if there's any particular reason why the source for building those jar files isn't also in the github repository?

I'm assuming the logic is that asking people to additionally compile those from source felt like a bit too much to handle, though that would be an even better argument for a stable docker image.

I'll start working on a simple Dockerfile that pulls in the sourceforge stuff and see how I get on. Have got it all working locally, so will just try to replicate that. If we're unable to add in the source of the other jars for a full clean build, then we might want to use something like docker-compose to pull from a public dockerhub image (so the sourceforge stuff only needs downloading if the image is updated, which doesn't seem like it will be that frequent, vs downloading each time someone wants to build the docker container).

Ideally we have the complete source in one place, and then a docker build is much easier and straightforward, but I appreciate this might not be possible.

Oh, and I didn't actually get to the stage yet where I needed to do anything with python...was that for using the project to actually generate sentences? It was a bit unclear from the readme so just want to make sure that I've got all the bases covered.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/OpenCCG/openccg/issues/23#issuecomment-473075307, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxvzXf5_mt1JTImn8iFqhcZsUYuODgxks5vWsHAgaJpZM4bwLy- .

lpmi-13 commented 5 years ago

ah yes, of course. I should have assumed something like ant-contrib.jar wasn't specific to this project (I'm not really a java user, clearly). I've found almost all of the dependencies via the maven repository and will add in pulling from their into the Dockerfile. Will try to track down the rest so it's a bit closer to a clean build.

Also got the python bit working, since apparently python2.7 is not installed by default anymore with ubuntu16.04 images.

mwhite14850 commented 5 years ago

Thanks for looking into this!

Do please add a section to the readme about the Dockerfile.

On Fri, Mar 15, 2019 at 2:24 AM Adam Leskis notifications@github.com wrote:

ah yes, of course. I should have assumed something like ant-contrib.jar wasn't specific to this project (I'm not really a java user, clearly). I've found almost all of the dependencies via the maven repository and will add in pulling from their into the Dockerfile. Will try to track down the rest so it's a bit closer to a clean build.

Also got the python bit working, since apparently python2.7 is not installed by default anymore with ubuntu16.04 images.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/OpenCCG/openccg/issues/23#issuecomment-473173135, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxvzTtTGXTb5C0cOAMqCdwPjz96RJgOks5vWzyogaJpZM4bwLy- .

mwhite14850 commented 5 years ago

Hi Adam (also Dave)

What is the status of this direction? Šarūnas Navickas has just made a pull request for migrating to Maven; as noted for that request, it would be helpful to figure out whether one or both of these should be incorporated.

https://github.com/OpenCCG/openccg/pull/27

Thanks! Mike