Giter Site home page Giter Site logo

Running in Docker? about avnav HOT 8 OPEN

tkurki avatar tkurki commented on June 26, 2024
Running in Docker?

from avnav.

Comments (8)

free-x avatar free-x commented on June 26, 2024

hi @tkurki
at first you need to adjust options for start of avnav

Illegal option -h
invalid option ?
usage: /usr/bin/avnav [-e] [-d] [-q] [-b basedir] [-c chartdir] [-x cfgfile] [-t template] [-g] [-a softwareBase] [-v viewerDir]
       -b basedir     : data dir for avanv routes,tracks,charts,...
       -c chartdir    : separate dir for charts (instead of basedir/charts)
       -x cfgfile     :  start the server directly with this config (not for gui)
       -t template    : create basedir/avnav_server.xml from this if not found
       -l loglevel    : set the log level (ERROR|INFO|DEBUG)
       -e             : directly fail on any errors in avnav_server.xml instead of trying avnav_server.xml.ok
       -d             : start with loglevel debug
       -g             : start with GUI instead of normal server mode
       -q             : do not log to stderr
       -n envFile     : read environment variables from env file if it exists
       -------------- some development options --------------
       -a softwareBase: find the server software at this directory
       -v viewerDir   : find the viewer software at this directory

Volume with "data" should be exported

An example of avnav as client of SK can be found at openplotter
https://raw.githubusercontent.com/e-sailing/openplotter-avnav/master/openplotterAvnav/data/avnav_server.xml

Indeed o-charts in docker would be most exciting part

greetings
free-x

from avnav.

wellenvogel avatar wellenvogel commented on June 26, 2024

I think it should be possible...
Basically everything has defaults and should more or less start to work out of the box.
As @free-x already said it would make sense to have the data dir (-b) on a mounted volume - but it depends.
Running o-charts should be possible (doing this while developing) - just install the package avnav-ocharts-plugin (it will also install the avnav-ocharts) and the dependencies.
The interesting part is the licensing stuff. I would be rather sure that you could create an FPR and get some charts assigned from the shop.
Not sure about the dongle. But if having the right privileges for USB devices it could work...
Just ensure to have 8080 (AvNav itself) and 8082 (AvNav-ocharts) as ports being mapped (or you need to use the docker network addresses).
For o-charts there could be some issue with the network addresses:
The plugin checks the client address to be in a local network. So potentially using the docker network finally is the only real chance...

For the SK connectivity:
You can easily configure a remote SK host. If you want to "feed" everything from Signalk it should be sufficient to set the correct SK host on the AVNSignalKHandler (Server/Status page), activate "decodeData", "fetchAis". If you want to send back you can activate "sendData". In this case you need to input username/password.
If you want you still can configure other connections - but that's not really necessary for this case.

If you have put your data dir to a mounted volume things should be persistent.
And if you would like to go for multiple instances - just take your adapted avnav_server.xml, put it into the docker image and use it for the -t parameter - this way starting with it as a template.

from avnav.

tkurki avatar tkurki commented on June 26, 2024

For chart licensing I was thinking about the dongle as the only viable option, I don’t think anything else makes sense. You should be able to recreate Docker containers whenever.

from avnav.

wellenvogel avatar wellenvogel commented on June 26, 2024

Agree..
So we just have to find out what the dongle needs - not sure if --device will do or if we have to go for some --privileged mode for the container.
OK - a quick check shows that oexserverd is accessing /dev/bus/usb/** - so not sure if this will work out of the box.

from avnav.

tkurki avatar tkurki commented on June 26, 2024

Build with avnav-ocharts-plugin fails with this Dockerfile on RPi 3 arm64

#0 10.71 The following packages have unmet dependencies:
#0 11.28  libgtk-3-0 : Depends: libgtk-3-common (>= 3.24.24-4+rpt2) but it is not going to be installed
#0 11.28               Recommends: libgtk-3-bin but it is not going to be installed
#0 11.28               Recommends: librsvg2-common but it is not going to be installed

Ideas?

from avnav.

free-x avatar free-x commented on June 26, 2024

Hi @tkurki,

libgtk-3-common is a part of Raspbian repository which is not in sources.list in your Docker.
I included package yet to my repo. You could try again

Regards
free-x

from avnav.

wellenvogel avatar wellenvogel commented on June 26, 2024

Additional hint:
As always - when mapping the data dir from outside - take care of user id / permissions.
Basically avnav is able to run with every user. So you could either add a user that has the same id like your host user - or change the userid for avnav...

from avnav.

tkurki avatar tkurki commented on June 26, 2024

Thanks, I'll worry about userid mapping etc once I get both avnav and avnav-ocharts-plugin to install & start.

Not sure how much time I'll have for this in the coming weeks, but at least I have a start that even somebody else could continue if I fall by the wayside...

from avnav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.