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

fix(docker): fix env path in dockerfile #90

wants to merge 1 commit into from


Copy link

@hanxiao hanxiao commented Oct 28, 2020

What type of PR is this?

/kind bug

What does this PR do / why do we need it:

In the 1.0.0 Docker image, pip is configured in a way that all command line entrypoints are installed into /root/.local/bin. However, /root/.local/bin is not in the PATH env variables. This causes the problem that all Python packages that have CLI interfaces will throw "Command not found" error.

For example,

FROM mindspore/mindspore-cpu:1.0.0

RUN pip install --user pytest && pytest 

In this particular case, one workaround is to use python -m pytest. However, not all CLI-enabled packages implement this usage.

Which issue(s) this PR fixes:

This PR adds /root/.local/bin to env PATH inside Mindspore Dockerfile, so that all images built on top of mindspore will not suffer from this usability issue.

Special notes for your reviewers:

Please note that this should be applied to all Dockerfiles. Right now I'm just fixing one to showcase the problem and confirm with your dev team to see if this is the way to go.

Copy link

CLAassistant commented Oct 28, 2020

CLA assistant check
All committers have signed the CLA.

Copy link

Welcome @hanxiao!

It looks like this is your first PR to mindspore-ai/mindspore 🎉.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if mindspore-ai/mindspore has its own contribution guidelines. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to MindSpore. 😃

Copy link

Hi @hanxiao. Thanks for your PR.

I'm waiting for a mindspore-ai member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

Hi @hanxiao , sorry for the late replies. We want to let you know that this PR has been transferred into MindSpore Gitee repo:, and we will keep u noticed with the latest PR update : )

Copy link

Hi @hanxiao, please notice that the cloned Gitee PR ( has been approved and merged into the codebase, so this PR would be closed. Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

4 participants