Skip to content

Source conda.sh in env.sh | More robust env.sh #1651

@abejgonzalez

Description

@abejgonzalez

Background Work

Chipyard Version and Hash

N/A

OS Setup

N/A

Other Setup

N/A

Current Behavior

Chipyard's env.sh sources the conda environment by running conda activate .... However, if source /home/eecs/abe.gonzalez/miniforge3/etc/profile.d/conda.sh (or it's equivalent) isn't set up in the shell it will error saying there is no conda command. Sometimes this is due to users having a non-interactive bash setup v.s. an interactive one. This can be solved by adding source /home/eecs/abe.gonzalez/miniforge3/etc/profile.d/conda.sh to the env.sh.

Additionally, when running build-setup.sh multiple times, the conda activate ... will be appended multiple times to the file causing slow env.sh source times. This can be solved by doing what conda does by having a the setup scripts check the env.sh file for specific sections and replacing them if they exist (instead of appending).

Expected Behavior

See above.

Other Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions