microsoft / microsoft/onnxruntime
[Dockerfile] Recommendation to remove the old way to include miniconda in PATH.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
This is not a bug, rather a recommendation. I use the onnxruntime docker image as the base to build our images, and when I activate conda in the container, it prints this:
```
Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file. You should manually remove the line that looks like
export PATH="/opt/miniconda/bin:$PATH"
^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^
```
I see the PATH being set in the Dockerfiles for example [Dockerfile.source](https://github.com/microsoft/onnxruntime/blob/1cad3e322ebc33f03f95343626dd70eeeff77c78/dockerfiles/Dockerfile.source#L18) and [Dockerfile.cuda](https://github.com/microsoft/onnxruntime/blob/1cad3e322ebc33f03f95343626dd70eeeff77c78/dockerfiles/Dockerfile.cuda#L19).
The new way to initialize conda is as follows:
```
If your shell is Bash or a Bourne variant, enable conda for the current user with
$ echo ". /opt/miniconda/etc/profile.d/conda.sh" >> ~/.bashrc
or, for all users, enable conda with
$ sudo ln -s /opt/miniconda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH. To do so, run
$ conda activate
in your terminal, or to put the base environment on PATH permanently, run
$ echo "conda activate" >> ~/.bashrc
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Dockerfile.source and Dockerfile.cuda at the referenced PATH setup lines, then compare how conda is initialized in each image. Done means the obsolete miniconda PATH configuration is removed and the Dockerfiles use the recommended conda initialization described in the issue; verify the images still support conda activation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dockerfile
- Domain
- devops
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100