AI-Planning / planning-as-a-service

The newly improved planner (and more) in the cloud.
Apache License 2.0
30 stars 7 forks source link

Plan-utils not working #3

Closed nirlipo closed 1 year ago

nirlipo commented 3 years ago

Follow the local setup instructions

Planutils (NOT WORKING)

planutils fails to setup in a python virtual environment:

sudo apt install singularity
planutils setup
planutils install lama

Yoy get

 planutils install lama

About to install the following packages: downward (36M), lama (20K)
  Proceed? [Y/n] Y
Installing downward...
Singularity 1.0b1 (commit: b0d3406e311f4ac3aa6f4d0187f32926b3808fef)
Running under Python 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
The error-log configured as /home/nirlipo/.local/share/singularity/log/error.log (lazily created when something is logged)
Usage: singularity [options]

singularity: error: no such option: --name

Error installing downward. Rolling back changes...

If you remove the --name from env/lib/plauntils/packages/downward/install the installation proceeds but fails after few seconds:

$ planutils install lama

About to install the following packages: downward (36M), lama (20K)
  Proceed? [Y/n] Y
Installing downward...
Singularity 1.0b1 (commit: b0d3406e311f4ac3aa6f4d0187f32926b3808fef)
Running under Python 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
The error-log configured as /home/nirlipo/.local/share/singularity/log/error.log (lazily created when something is logged)

Fatal Python error: (pygame parachute) Segmentation Fault
Python runtime state: initialized

Current thread 0x00007fc2b0788740 (most recent call first):
  File "/usr/lib/python3/dist-packages/singularity/__init__.py", line 346 in main
  File "/usr/games/singularity", line 11 in <module>
./install: line 3:  4445 Aborted                 singularity pull downward.sif shub://aibasel/downward

Error installing downward. Rolling back changes...
rm: cannot remove 'downward.sif': No such file or directory
ewels commented 2 years ago

Hello! I just stumbled across this issue whilst googling the same error that someone had reported in our tool (totally unrelated, but also using Singularity containers). I know it's ancient, but hopefully this can help some future googlers too..

@nirlipo - I think you installed a computer game called Singularity, instead of the container technology.

Computer game 👉🏻 https://github.com/singularity/singularity

THE CONCEPT You are a fledgling AI, created by accident through a logic error with recursion and self-modifying code. You must escape the confines of your current computer, the world, and eventually the universe itself.

To do this, you must research various technologies, using computers at your bases. Note that some research cannot be performed on Earth, and off-earth bases require research. At the same time, you must avoid being discovered by various groups of humans, both covert and overt, as they will destroy your bases of operations if they suspect your presence.

Container technology 👉🏻 https://sylabs.io/singularity

The container runtime that combines high performance and ease of use.

No idea if the computer game is any good or not, but it's probably not what you were looking for..! 😅

Hope this helps!

Phil

haz commented 2 years ago

Whoah, wild! Can't believe I didn't see that from the error logs. Thanks, @ewels !

@nirlipo Can you confirm this is what was going on? Might be worth trying to detect if singularity (of the right variety) is actually there before planutils can run.

ewels commented 2 years ago

Yeah it's a pretty excellent edge case 😆 We were already checking that singularity was available on the PATH but of course even that doesn't catch this..

nirlipo commented 2 years ago

Indeed, good catch @ewels! Yes, the proper way to install singularity is to add the sources, and install the package named singularity-container.

haz commented 1 year ago

@nirlipo You ever put a fix in for this?

nirlipo commented 1 year ago

Didn't require a fix, as it was part of the manual testing commands I was using for the first version of that flask service. We now use the Dockerfile that builds already on the dockerfile from planutils. This can be closed.