Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: dual-bfws-ffparser fail in server #82

Open
hectorpal opened this issue Jun 7, 2022 · 4 comments
Open

Bug: dual-bfws-ffparser fail in server #82

hectorpal opened this issue Jun 7, 2022 · 4 comments

Comments

@hectorpal
Copy link
Contributor

How to reproduce:

  1. Build docker: environments/server/setup.sh
  2. Start in privileged mode: docker run -p 5555:5555 --privileged -d planutils-server
  3. Try server. For instance, following https://github.com/AI-Planning/planning-as-a-service#example-use
import requests
import time
from pprint import pprint

req_body = {
"domain":"(define (domain BLOCKS) (:requirements :strips) (:predicates (on ?x ?y) (ontable ?x) (clear ?x) (handempty) (holding ?x) ) (:action pick-up :parameters (?x) :precondition (and (clear ?x) (ontable ?x) (handempty)) :effect (and (not (ontable ?x)) (not (clear ?x)) (not (handempty)) (holding ?x))) (:action put-down :parameters (?x) :precondition (holding ?x) :effect (and (not (holding ?x)) (clear ?x) (handempty) (ontable ?x))) (:action stack :parameters (?x ?y) :precondition (and (holding ?x) (clear ?y)) :effect (and (not (holding ?x)) (not (clear ?y)) (clear ?x) (handempty) (on ?x ?y))) (:action unstack :parameters (?x ?y) :precondition (and (on ?x ?y) (clear ?x) (handempty)) :effect (and (holding ?x) (clear ?y) (not (clear ?x)) (not (handempty)) (not (on ?x ?y)))))",
"problem":"(define (problem BLOCKS-4-0) (:domain BLOCKS) (:objects D B A C ) (:INIT (CLEAR C) (CLEAR A) (CLEAR B) (CLEAR D) (ONTABLE C) (ONTABLE A) (ONTABLE B) (ONTABLE D) (HANDEMPTY)) (:goal (AND (ON D C) (ON C B) (ON B A))) )"
}

solve_request=requests.post(f"http://localhost:5555/package/{planner}/solve", json=req_body).json()
print(solve_request)

Returns

{'stderr': '/root/.planutils/packages/dual-bfws-ffparser/run: line 2: lapkt: command not found\n', 'stdout': ''}
@haz
Copy link
Contributor

haz commented Jun 7, 2022

Hrmz...can you add lapkt to the docker for the server, and let me know if it works?

@hectorpal
Copy link
Contributor Author

It also failed using this Dockerfile:


# Build the Planutils image and install the selected packages
FROM aiplanning/planutils:latest

# Needed for the server
RUN pip3 install flask

# FD Planner
RUN planutils install -f -y lama-first

RUN planutils install -f -y lapkt

# Satisficing classical planning
RUN planutils install -f -y dual-bfws-ffparser

EXPOSE 5555

CMD planutils server --port 5555 --host 0.0.0.0

@hectorpal
Copy link
Contributor Author

hectorpal commented Jun 7, 2022

This might be the issue:

docker run --rm --privileged -ti -v $PWD:/mnt/home aiplanning/planutils
root@56b9d5d7b58d:~# planutils install -f -y dual-bfws-ffparser
dual-bfws-ffparser will be installed.

About to install the following packages: lapkt (184M), dual-bfws-ffparser (0M)
Installing lapkt...
 181.71 MiB / 181.71 MiB [====================================================================================================================================================] 100.00% 6.86 MiB/s 26s
Finished installing lapkt (size: 182M)
Installing dual-bfws-ffparser...
Finished installing dual-bfws-ffparser (size: 24K)
root@56b9d5d7b58d:~# planutils run dual-bfws-ffparser  
/root/.planutils/packages/dual-bfws-ffparser/run: line 2: lapkt: command not found
root@56b9d5d7b58d:~# planutils activate

   Entering planutils environment...

(planutils) root@56b9d5d7b58d:~$ planutils run dual-bfws-ffparser
Error: the required argument for option '--output' is missing

The last one is correct.
Sounds like a path issue in case of dependencies.

@haz
Copy link
Contributor

haz commented Jun 7, 2022

Aha! Right you are. @nirlipo -- want to prefix the laptkt extensions with planutils run to make things work again? Using just lapkt will only work if planutils is activated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants