mbari-org / m3-quickstart

A simple and quick method to run MBARI's Video Annotation and References System
1 stars 1 forks source link

Notes on installation at CORI #10

Open hohonuuli opened 1 year ago

hohonuuli commented 1 year ago

Starting a thread to help improve future user experiences when running a VARS intallation. Notes from Slack:

From Francisco:

Hi Brian. I have started to install VARS, but after "bin/vars_build.sh" I get a problem that i wasn´t able to resolve:

Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve com.guigarage:sdkfx:0.2.7.jre17.
     Required by:
         project :
      > Could not resolve com.guigarage:sdkfx:0.2.7.jre17.
         > Could not get resource 'https://maven.pkg.github.com/mbari-org/maven/com/guigarage/sdkfx/0.2.7.jre17/sdkfx-0.2.7.jre17.pom'.
            > Could not GET 'https://maven.pkg.github.com/mbari-org/maven/com/guigarage/sdkfx/0.2.7.jre17/sdkfx-0.2.7.jre17.pom'. Received status code 401 from server: Unauthorized
hohonuuli commented 1 year ago

For the build failing:

@Francisco (CORI) We host some build artifacts using GitHub packages. Unfortunately, GitHub requires users to configure authentication in order to get those packages. (So the m3-quickstart build doesn’t work straight out of the box). The fix is straightforward though and documented at https://github.com/mbari-org/maven (edited). I think for that build to work you just need to set a couple of environment variables:

export GITHUB_USERNAME 'your github username'
export GITHUB_TOKEN 'your github token'
FranciscoCORI commented 1 year ago

I am sorry, I missed this point on the instructions about the Tokens "Be sure to include read:packages". Now the error has gone but I get a new one after launching _varsbuild.sh

> Task :compileJava FAILED error: cannot access module-info bad class file: /home/ubuntu/.gradle/caches/modules-2/files-2.1/org.mbari.vcr4j/vcr4j-core/5.2 .0/fc1db70a4503dcf4f2427eefb8f66c7dcfaee298/vcr4j-core-5.2.0.jar(/module-info.class) class file has wrong version 61.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath. /home/ubuntu/m3-quickstart/temp/repos/vars-query/src/main/java/module-info.java:1: error: module not found: gson.javatime.serialisers open module org.mbari.vars.query {

> Task :compileJava FAILED error: cannot access module-info bad class file: /home/ubuntu/.gradle/caches/modules-2/files-2.1/org.mbari.vcr4j/vcr4j-core/5.2 .0/fc1db70a4503dcf4f2427eefb8f66c7dcfaee298/vcr4j-core-5.2.0.jar(/module-info.class) class file has wrong version 61.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath. /home/ubuntu/m3-quickstart/temp/repos/vars-query/src/main/java/module-info.java:1: error: module not found: gson.javatime.serialisers open module org.mbari.vars.query {

hohonuuli commented 1 year ago

@FranciscoCORI That message means you have Java 11 installed (i.e. class file version 55.0). You need to have Java 17 or later installed (class file 61)

FranciscoCORI commented 1 year ago

@hohonuuli Thanks a lot. I have installed Java 17

java -version openjdk version "17.0.6" 2023-01-17 OpenJDK Runtime Environment (build 17.0.6+10-Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 17.0.6+10-Ubuntu-0ubuntu122.04, mixed mode, sharing)

Now, running vars_build.sh I get:

Task :jpackage FAILED Bundler DEB Bundle skipped because of a configuration problem: Can not find fakeroot. Reason: Cannot run program "fakeroot": error=2, No such file or directory Advice to fix: Please install required packages

But I have been able to resolve it just with:

sudo apt-get install fakeroot

FranciscoCORI commented 1 year ago

I have been able to install it, and bow I am trying to figure out how to use it. Thanks a lot @hohonuuli

It´s not a big deal, but perhaps it could be easier to follow by rookies like me if this phrase is write in this way

Run the VARS Knowledgebase application located in m3-quickstart/temp/apps. . The first time it's run it will ask you to create an admin account. Remember your admin password!!

FranciscoCORI commented 1 year ago

I have being able to register a test video following:

The next step is to register the video. It's highly recommended that you follow a naming convention described here.

But in the link I haven´t being able to know the naming convention. After getting this error:

_ubuntu@cori:~/m3-quickstart/bin$ ./vars_register_media.sh "GoPro10" "Palomas" "http://141.147.1.6/media/12052022.mp4" Reading video metadata from http://141.147.1.6/media/12052022.mp4 Traceback (most recent call last): File "/home/ubuntu/m3-quickstart/bin/etc/python/vars_register_media.py", line 106, in main(args.camera_id, args.deployment_id, args.uri) File "/home/ubuntu/m3-quickstart/bin/etc/python/vars_register_media.py", line 52, in main start_time_utc = timeutil.datetime_from_name(uri) File "/home/ubuntu/m3-quickstart/bin/etc/python/timeutil.py", line 35, in datetime_fromname raise RuntimeError(f'Failed to parse time from {name}')

And checking the file timeutil.py I have being able to register it following the convention name: "%Y%m%dT%H%M%S.%fZ" getting :

./vars_register_media.sh "GoPro10" "Palomas" "http://141.147.1.6/media/20220301T120022Z.mp4"