Skip to content
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

GF on Docker? #145

Open
kristiank opened this issue Aug 18, 2022 · 2 comments
Open

GF on Docker? #145

kristiank opened this issue Aug 18, 2022 · 2 comments

Comments

@kristiank
Copy link

A quick search on the internet for Grammatical Framework and Docker finds many hints for at least some support of GF having been dockerized.

Looking at it as a newcomer from the outside, it would be much worth having information about Docker under the Get started > Download GF heading.

What I would expect is some Docker commands for getting gf --server running in a container instance and some notes on which version of GF it contains and whether the version will always be the latest when running the Docker commands again.

@johnjcamilleri
Copy link
Member

Yes this makes sense, to be honest I thought there already was a Dockerfile in gf-core but apparently not.

Compiling and running GF in a Docker container is straightforward enough, but we need to think about how to get grammars into this container.

  • There's the RGL, which would need to be compiled inside the container too, but is not part of the gf-core repository. So maybe we have a start-docker.sh script, which if provided a path to RGL sources, compiles them as part of the image build. If not provided, either pulls the latest from GitHub and uses those, or just doesn't compile any RGL.
  • Then there's the user's own grammars. I'm not really sure what the use-case is here. If they are new users then presumably they don't have any grammars or are in the process of writing some. Rather than try to accommodate this, I think we have to leave this up to the user as to how to get their grammars into the container, e.g. via mounting a volume etc.
  • To complicate this a little, there's also Krasimir's new effort to move the GF cloud stuff into a separate repo. I guess here we handle it in the same way as the RGL, i.e. the start-docker.sh script does slightly different things depending on whether it is given a path to gf-cloud or not.

@anka-213
Copy link
Member

anka-213 commented Oct 4, 2022

It might be possible to resolve this by doing the dockerfile in several layers, where e.g. the rgl dockerfile depends on the gf-core one. One downside is that it might be confusing to have a gf docker image that doesn't include rgl. But maybe naming it gf-core and naming the one with rgl just gf is enough to resolve that confusion.

When it comes to user grammars, the user could in turn have their own dockerfile or docker-compose config that imports their grammars into the image or mounting it. We could provide a template for doing that, to make it easier.

Using layers would also resolve the GF cloud issue, by having a separate docker-file for that as well, that depends on the gf-core docker file, in which case that docker image would also be imported by the one just called gf.

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

No branches or pull requests

3 participants