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

Offline version of FLAT? #182

Closed
luutuntin opened this issue May 9, 2022 · 4 comments
Closed

Offline version of FLAT? #182

luutuntin opened this issue May 9, 2022 · 4 comments

Comments

@luutuntin
Copy link

Hi Maarten,

We have a collaborator currently living in Kharkiv, Ukraine. She hasn't been able to work with us, mainly using FLAT, since the war started due to no access to reliable Internet connection. We are thinking of resuming her work by instructing her to create an offline version of FLAT on her PC computer. As she is not a programmer, the instruction should be as simple as possible. Do you have any experience of supporting similar cases or any advice for us?

Best,
Alex

@proycon
Copy link
Owner

proycon commented May 9, 2022

Hi Alex,

FLAT is currently included in LaMachine and can already be run locally through a virtual machine if she's on a Windows system. However, there are two caveats you'll probably run into:

  1. You'll want to ship a specific FLAT configuration for your annotation task
  2. FoLiA/FLAT tends to reference set definitions for the vocabulary which may live anywhere on the web and are obtained on-the-fly, this will time-out if there's no connection.

We're slowly deprecating our LaMachine solution and I'm planning to create a more lightweight FLAT OCI/docker container (I can do that this week). This could then be used for your use case, you can simply expand upon the Dockerfile then. On the user-end she'd then only need the docker daemon (which will arrange virtualisation in case she's on Windows) and can then connect via localhost. I'd still have to find a fitting solution for the 2nd problem (using some local cache dir probably) but that looks doable. I certainly want to support this use-case as I also consider offline-usage important in general, and this specific case is of course a painful illustration of why we can't always assume everybody to be connected all the time.

@proycon proycon self-assigned this May 9, 2022
@luutuntin
Copy link
Author

Thank you so much, Maarten. The lightweight FLAT OCI/docker container sounds really neat. We look forward to your update on that and the solution for the 2nd problem.

proycon added a commit to proycon/foliapy that referenced this issue May 13, 2022
…at disables remote downloads of set definitions and looks locally instead. (proycon/flat#182)

Enables off-line usage.
proycon added a commit that referenced this issue May 13, 2022
proycon added a commit that referenced this issue May 20, 2022
@proycon
Copy link
Owner

proycon commented May 20, 2022

This is now implemented and released (v0.11). There is a new OCI/Docker container available and you can now specify the FLAT configuration via external yaml files (point 1) and some environment variables (so you don't have to edit settings.py) and can use the contaimer image as-is. The FLAT Documentation has been updated accordingly.

Regarding the inability to download set definitions (point 2) when offline, I implemented a FOLIAPY_FORCE_LOCALSETDIR environment variable in the FoLiA Python library. This you can set to a directory that holds the pre-downloaded set definitions (this should be put on a persistent volume mounted into the container, just like the directory for the FoLiA data (FLAT_DOCROOT) and the external yaml configurations (FLAT_CONFIG_DIR)). The folia library will then attempt a simple match on filename (basename). You can simply pass this environment variable to the FLAT docker container to enable this functionality.

@proycon proycon closed this as completed May 20, 2022
@luutuntin
Copy link
Author

Thank you. I have managed to create a working offline instance of FLAT with our specific configuration.

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

No branches or pull requests

2 participants