LiveODM - Updating & "self-host"

I’m currently in the process of attempting to update the LiveODM environment.

So far, I have succeeded in updating within 16.04LTS to the latest packages without issue/breakage.

My intent at this juncture is to get LiveODM to “self-host”, so that I can use Piero’s script to git/compile/run the latest WebODM+ODM natively under the LiveODM environment.

I’ve had to install a number of missing dependencies to get as far as I have, but now I’m afraid I’m stuck with an error with django-guardian.

django.core.exceptions.ImproperlyConfigured: In order to use django-guardian's ObjectPermissionBackend authorization backend you have to configure ANONYMOUS_USER_ID at your settings module

Full Console Log:
https://1drv.ms/u/s!AvMZEGXuAwQzs54uyU3kfcB_CADkzQ?e=9mSanu

Did you make sure to enable a Python3 virtual environment while installing the pip dependencies for WebODM? I’m guessing you probably installed pip dependencies using the general command pip install <dependency>, which probably installed the wrong version of a package; always install dependencies using the requirements.txt file via pip install -r requirements.txt making sure you are within a Python 3 (not python 2) environment when dealing with WebODM.

1 Like

Nope, just used the Script you posted before. Installed dependencies via Synaptic.

It seems like I may have broken this environment severely haha

1 Like

So would the following modification do your script be more robust in the LiveODM environment which ships with both python2/pip and python3?

cd /code
git pull origin master
sudo bash configure.sh reinstall

cd /www
git checkout package.json
git pull origin master
npm install

cd /webodm
git checkout package.json
git pull origin master

source python3-venv/bin/activate
npm install
python3 -m pip install -r requirements.txt
webpack --mode production
python3 manage.py collectstatic --noinput
python3 manage.py migrate
bash app/scripts/plugin_cleanup.sh
echo “from app.plugins import build_plugins;build_plugins()” | python3 manage.py shell

sudo chown -R odm:odm /code /www /webodm /home/odm

I think it compiled successfully?

1 Like

So, how do I check/ensure that I am actually running the latest/greatest API/Engine version after running the script?

Does this version number mean anything important?

Seems legit to me, but I have NFI what I’m doing :rofl:

2 Likes

So, I got greedy and pushed to 18.04LTS and broke node?ODM (localhost:3000 processing node offline), though WebODM seems to work just fine. Seems to be a missing library issue with 18.04LTS using grass 7.0.4.1 versus 7.0.4.0 for 16.04LTS. Not sure how to work around that quite yet.

Went YOLO and pushed to 20.04 because it was already broken.

It actually seems to get much further towards a successful compile & run under 20.04 than it did under 18.04 LTS…

https://github.com/Saijin-Naib/ODM_Scripts

1 Like

More like YOLOL. That’s awesome.

1 Like

Would be awesome to skip a full LTS release and go directly to 20.04.

3 Likes

If either of you feel like you can spare a minute to help me parse this log, that’d be amazing. I’m at a bit of an impasse currently, trying to figure out what my next blocker is that I need to take down.

Thanks!

Saijin-Naib/ODM_Scripts/master/log.log

Just jumping in to say that I have the LiveUSB installed in a VM and would love to be able to keep it updated too. I am not a docker/django/pip/python/node person though so I will have to watch and maybe I’ll be useful if you get to the point where you and Piero want to have someone else try the instructions.

P.S. The first error I hit was on line two of those instructions/suggestions where /code is not a git repository. At that point, it was obvious that I’d be going off-piste and I’m not up for that at the moment. :slight_smile:

1 Like

@amos, don’t worry, that screwed me up too!

Check out the link to my GitHub repository, where I’ve been tweaking a few of the configuration and shell script files. I made it past that hurdle already, and I’d love to hear if my modified scripts/configs work in a fully original 16.04LTS environment for you, if you’re willing to try.

I’d definitely recommend a snapshot before you begin, though.

What are everyone’s thoughts on a SNAP package for LiveODM? Does that help solve dependency issues for a “native” install?

I’ve been asking around, and I think it might be time for me to reset, go to 18.04LTS, and try again to see if I get any further than I did under 20.04.

Thanks. I think a snap would be fantastic. Although similar, snaps seem to have started with trying to solve the deploy and update problem on linux while docker seems to have started as more of a helper with development environments on linux. That difference in early focus seems to make a big difference when it comes to supporting an environment after install.

That said, snap doesn’t yet have much support beyond linux so it may not be something the ODM/WebODM devs want to take on themselves. Personally, I’d love a WebODM snap that runs on 20.04. Are you thinking of trying to make/maintain one?

1 Like

If you thought I was out of my depth with this current path, just wait haha.

No, currently no plans on starting the SNAP unless it is exceedingly easy.

Just testing the waters thus far. Still want to see if I can get LiveODM off 16.04

Would be awesome to have a snap package (and help building/maintaing it).

2 Likes

This person directed me to ask for help on the snap forums. l wonder if they might help?

I don’t know enough about all the building blocks of WebODM. It looks like it uses a big bunch of stuff under the hood. Some of it may only be needed for all the docker packaging though.

Check out https://snapcraft.io/ where they have some tutorials to step through for a bunch of different application environments. I don’t know what happens if you have several environments going on at once (like python & node). I bet you’d have to start from the vanilla dependencies at https://github.com/OpenDroneMap/WebODM#run-it-natively and skip all the docker stuff.

1 Like

I just reset my LiveODM back to 16.04 and it can’t self-host out of the box, so tracking down exact dependencies will be my immediate goal.