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

add installation instructions #43

Open
jendrikseipp opened this issue Aug 9, 2021 · 18 comments
Open

add installation instructions #43

jendrikseipp opened this issue Aug 9, 2021 · 18 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jendrikseipp
Copy link
Contributor

It would be great if the README had some brief installation instructions. Is it possible to use pipx install planutils? In which ways is the bash environment altered?

@haz
Copy link
Contributor

haz commented Aug 10, 2021

.bashrc is modified to augment the PATH and PLANUTILS_PREFIX paths:

print("Adding bin folder to path (assuming ~/.bashrc exists)...")

Not sure if it works w/ pipx, but I would assume not :P

@roveri-marco
Copy link
Contributor

Related to this, I think it would be important to check and document the need of singularity being previously installed in the host machine. Here some notes I've collected for my course:

  • Be sure to use Python version ≥ 3.6.*
    • To install pip or pip3 (in Debian like Linux distributions e.g. Ubuntu):
      Run apt-get install python-pip or apt-get install python3-pip
  • Be sure singularity framework is installed in the host machine, If not, have a look at this URL:
  • To update planutils run pip3 install --upgrade planutils and then planutils upgrade to download latest versions of the singularity images!

@tomitrescak
Copy link

I am lost how to install this ;( I installed it with pip3, but I am getting "permission denied".

@roveri-marco
Copy link
Contributor

I am lost how to install this ;( I installed it with pip3, but I am getting "permission denied".

Permission denied for which command? Singularity or for planutils? Can you be more precise and post here the error you're getting?

@haz
Copy link
Contributor

haz commented Oct 26, 2021

Might be that you don't have permission to install pip packages as a user, so sudo pip3 install planutils would be the path. But either way, having singularity installed/configured is a must.

A far easier path (for now) is to just use the docker version: https://hub.docker.com/r/aiplanning/planutils

@jendrikseipp
Copy link
Contributor Author

Maybe this is useful for others: to install Singularity on Ubuntu 20.04, one can use the Debian package for Singularity:

wget http://ftp.se.debian.org/debian/pool/main/s/singularity-container/singularity-container_3.5.2+ds1-1_amd64.deb -O singularity.deb
sudo dpkg -i singularity.deb 

@haz
Copy link
Contributor

haz commented Nov 6, 2021

Nice! This the latest version of singularity that we need to run the images?

@jendrikseipp
Copy link
Contributor Author

I had no trouble running planners with Singularity 3.5. Thanks to Álvaro and Florian, all IPC 2018 planners run under SIngularity 3.5 (https://ipc2018-classical.bitbucket.io/).

@tomitrescak
Copy link

Just update on my situation, the problem was missing Singularity install, the planner now run well.

@roveri-marco
Copy link
Contributor

I'm able to run all also with 3.8.0-rc.1+134-g946c9fd5f

@haz
Copy link
Contributor

haz commented Nov 22, 2021

This is brilliant news! Means it's finally time to dust off and promote the thing (was waiting for Singularity version to not pose an issue).

Will address this issue and others in the coming weeks as my course-load drops. Stay tuned!

@guicho271828
Copy link
Contributor

The correct answer to the adding PATH to .bashrc... is to set up entrypoints and make pip handle binaries by itself.
https://setuptools.pypa.io/en/latest/userguide/entry_point.html

@haz
Copy link
Contributor

haz commented Nov 26, 2021

We already do that for planutils: https://github.com/AI-Planning/planutils/blob/master/setup.py#L20

@haz
Copy link
Contributor

haz commented Nov 26, 2021

Thing is that we'd like to be dynamically installing things as you use the library, which is why it's all placed in a local ~/.planutils folder. You can see the wrangling happening here: https://github.com/AI-Planning/planutils/blob/master/planutils/__init__.py#L19

@guicho271828
Copy link
Contributor

I see.

In my opinion, we will have a better user experience if all scripts (e.g., lama, ff, etc) are already set up as entrypoints and each script installs binaries on demand and call the planner. aka idempotency.

Occasionally you may want to update a binary, but the user never has to explicitly install a binary.

@guicho271828
Copy link
Contributor

In other words, I believe we should utilize an already available python tooling as much as possible. I don't think it is correct to maintain the scripts ourselves. In a sense it is reinventing wheels that pip already handles.

@guicho271828
Copy link
Contributor

I see now that planutils setup creates bunch of shell scripts in .planutils, and see all scripts are already instantiated there.
I am pretty sure that this mechanism can be replaced with an entrypoint mechanism.

@haz
Copy link
Contributor

haz commented Nov 26, 2021

I think we're leaning away from that. It's very destructive to your cmd-line to have everything added all at once -- especially as the breadth of planutils grows. We don't want to reject certain additions just because there are "too many executables already".

It's moving to a model where planutils is the only binary installed by default, and you can do planutils run <planner> ... out of the box. Then an optional mode to place those bits of software on the path, if that's what you want. So planutils setup bash-path or whatever would do the behaviour you see now.

This brings it in line with pipx and the like.

But to your point...

In a sense it is reinventing wheels that pip already handles.

...this is very much the case. But solving it proper means moving to a configuration on top of anaconda or similar (to handle all the dependencies in a far better way, etc). Cf. #35

@haz haz self-assigned this Nov 26, 2021
@haz haz added the documentation Improvements or additions to documentation label Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants