dsnopek / anki-sync-server

A personal Anki sync server (so you can sync against your own server rather than AnkiWeb)
GNU Affero General Public License v3.0
744 stars 95 forks source link

[Feature Request / Clarification] Headless mode? #73

Open aphirst opened 6 years ago

aphirst commented 6 years ago

I found out about the project and as far as I can tell the server itself doesn't require anything graphical or X-related. However, at least for my Linux distro, anki itself is a dependency, which necessitates all of X. Of course, I was keen to use this on my headless server (for my home LAN), and would very much prefer to not install that whole set of packages.

Is there something I've fundamentally misunderstood / overlooked about how anki-sync-server operates? If not, should I request the maintainers of anki-sync-server that "anki" no longer be a dependency, or at least be "optional"?

CaptainTyphoo commented 6 years ago

I'm running anki-sync-server on a headless CentOS 7.4 box and there is neither anki nor X installed. There is no reason for anki to be a depency.

dsnopek commented 6 years ago

The anki code needs to be there (because it uses it like a library) but it doesn't call anything that would require X

aphirst commented 6 years ago

Hmm, these accounts seem contradictory. @CaptainTyphoo Are you sure you don't have anki installed, or that anki isn't being "effectively" installed with your anki-sync-server package?

CaptainTyphoo commented 6 years ago

@dsnopek is the author, so he is probably right. I checked again, I don't have anki installed via yum. I installed anki-sync-server via easy_install and everything needed must have come with that installation.

aphirst commented 6 years ago

I'll forward these comments on to the AUR maintainers for anki-sync-server over in the Arch Linux community, and will report back once I make some progress.

@CaptainTyphoo I'm not familiar with CentOS. Are you able to show me e.g. the 'build script' for anki-sync-server over there? It might be useful to know how they make their build. In Arch, the anki package necessarily depends on various X-related stuff in order to be able to "normally" run, so the only way I see this working is if either there were to be a separate anki-headless package, for anki to (bizzarely) only "optionally" depend on all the packages it needs to be able to be normally run, or to provide an anki "bottle" for the sync-server.

dsnopek commented 6 years ago

Installing via easy_install or pip is supposed to include a copy of the anki code "just in case" it can't find Anki installed on your system (although, there were reports of that being broken for some people), but if it can find Anki installed it'll prefer that. If you clone the git repo using --recursive it'll also pull in a copy of the Anki code so you don't need a system install.