Skip to content

Conversation

@vkarak
Copy link
Contributor

@vkarak vkarak commented Jun 11, 2020

This really facilitates the processes of getting ready to run when you clone ReFrame from Github. You need only to do

./bootstrap.sh

or

./bootstrap.sh +docs

This will pip install all the dependencies inside the ReFrame source directory under external/. ReFrame's main "binaries" are adapted to look into this directory first for their dependencies. This solution does not preclude any of the other installation methods.

Fixes #1365.

Still to do:

  • Update README
  • Update documentation
  • Update deployment script
  • Update CI script

Vasileios Karakasis added 2 commits June 11, 2020 15:38
This allows to run ReFrame out-of-the-box using a single preparation step:

```
./bootstrap.sh
./bin/reframe -l
```

No need for Python virtual environments.
@vkarak vkarak added this to the ReFrame sprint 20.09 milestone Jun 11, 2020
@vkarak vkarak requested review from teojgo and victorusu June 11, 2020 18:03
@vkarak vkarak self-assigned this Jun 11, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2020

Codecov Report

Merging #1371 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1371   +/-   ##
=======================================
  Coverage   91.66%   91.66%           
=======================================
  Files          83       83           
  Lines       12675    12675           
=======================================
  Hits        11618    11618           
  Misses       1057     1057           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f97a38...4c0d1dd. Read the comment docs.

@vkarak vkarak marked this pull request as draft June 11, 2020 18:16
@vkarak
Copy link
Contributor Author

vkarak commented Jun 11, 2020

To test this PR, start from an empty virtual environment, so that ReFrame cannot find any of its dependencies, in case you have already installed them.

@vkarak vkarak marked this pull request as ready for review June 13, 2020 18:14
@vkarak vkarak requested a review from victorusu June 13, 2020 18:15
Copy link
Contributor

@teojgo teojgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have an option to pass the python interpreter to use? For example on my system I have both python3.6, python3.8.

@vkarak
Copy link
Contributor Author

vkarak commented Jun 15, 2020

@teojgo That should be possible, but I will need to separate where I install the external dependencies, e.g., external/py36 and external/py38. Do you have any other suggestion?

@teojgo
Copy link
Contributor

teojgo commented Jun 15, 2020

@teojgo That should be possible, but I will need to separate where I install the external dependencies, e.g., external/py36 and external/py38. Do you have any other suggestion?

You can have the default python command as python3 and the user can specify another if needed. Then since you get pyver and use it for external dependencies it will get the correct one.

@vkarak
Copy link
Contributor Author

vkarak commented Jun 15, 2020

@teojgo The pyver is used exclusively for retrieving the right pip that was installed by ensurepip. All ReFrame's dependencies are then placed unconditionally under external/. Notice that I'm using --target and not --prefix. Prefix differentiates over the python version through the site-packages. I could do that, but that would require me to update all the files that update the sys.path. Why do you need this distinction? With your solution, you would have to re-bootstrap ReFrame for every Python version, whereas with the current one, you don't need to do so. The only problem I see is that when one of the packages installed does not run with a different Python version than the one used to bootstrap ReFrame, which in this case we should take it into account when writing the requirements.txt.

@teojgo
Copy link
Contributor

teojgo commented Jun 15, 2020

@teojgo The pyver is used exclusively for retrieving the right pip that was installed by ensurepip. All ReFrame's dependencies are then placed unconditionally under external/. Notice that I'm using --target and not --prefix. Prefix differentiates over the python version through the site-packages. I could do that, but that would require me to update all the files that update the sys.path. Why do you need this distinction? With your solution, you would have to re-bootstrap ReFrame for every Python version, whereas with the current one, you don't need to do so. The only problem I see is that when one of the packages installed does not run with a different Python version than the one used to bootstrap ReFrame, which in this case we should take it into account when writing the requirements.txt.

It's ok. The problem is when you have an alternative installation of python on your system that the standard python3. But I believe this is specific to my local installation where I have to make the differentiation. Otherwise it's fine.

@vkarak
Copy link
Contributor Author

vkarak commented Jun 15, 2020

@teojgo From our offline discussion I understood what you actually want and I'm gonna do it.

Copy link
Contributor

@teojgo teojgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vkarak it works for all my python installations now.

Copy link
Contributor

@victorusu victorusu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vkarak vkarak merged commit e3ed542 into reframe-hpc:master Jun 15, 2020
@vkarak vkarak deleted the feat/immediate-install branch June 15, 2020 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install and run reframe directly from Github

4 participants