Skip to content

Conversation

@akihironitta
Copy link
Contributor

@akihironitta akihironitta commented Jan 24, 2022

What does this PR do?

Fixes #11566 and unblocks #11567.

Problem

So, the problem is that apex is somehow installed to:

/usr/lib/python3.7/site-packages/  # which is not in `sys.path`

while other dependencies, for example torch, are installed to:

/usr/local/lib/python3.7/dist-packages/

Not sure why pip install the libraries in different directories...

Description of the change

To fix this, I just added --user so that it installs apex to:

/root/.local/lib/python3.7/site-packages/

which is part of sys.path:

$ python -m site
sys.path = [
    '/',
    '/usr/lib/python37.zip',
    '/usr/lib/python3.7',
    '/usr/lib/python3.7/lib-dynload',
    '/usr/local/lib/python3.7/dist-packages',
    '/usr/lib/python3/dist-packages',
]
USER_BASE: '/root/.local' (exists)
USER_SITE: '/root/.local/lib/python3.7/site-packages' (exists)
ENABLE_USER_SITE: True

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • [n/a] Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • [n/a] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

It was fruitful to finally get my hands on docker :)

cc @Borda @tchaton @rohitgr7 @akihironitta @carmocca

@akihironitta akihironitta added the ci Continuous Integration label Jan 24, 2022
@akihironitta akihironitta marked this pull request as ready for review January 24, 2022 19:45
@akihironitta akihironitta added the bug Something isn't working label Jan 24, 2022
@akihironitta akihironitta changed the title Fix base-cuda docker build failure Fix apex installation path in Dockerfile Jan 24, 2022
@mergify mergify bot added the ready PRs ready to be merged label Jan 24, 2022
@mergify mergify bot requested a review from a team January 24, 2022 21:48
@awaelchli awaelchli enabled auto-merge (squash) January 24, 2022 22:08
@awaelchli awaelchli added this to the 1.5.x milestone Jan 24, 2022
@akihironitta akihironitta added the priority: 0 High priority task label Jan 28, 2022
@lexierule lexierule disabled auto-merge January 28, 2022 01:14
@lexierule lexierule merged commit 86b177e into master Jan 28, 2022
@lexierule lexierule deleted the ci/fix-docker-apex branch January 28, 2022 01:14
@rohitgr7 rohitgr7 modified the milestones: 1.5.x, 1.6 Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Continuous Integration priority: 0 High priority task ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build-CUDA (3.7, 1.8) fails with ModuleNotFoundError: No module named 'apex'

7 participants