Skip to content

Commit

Permalink
Merge pull request #311 from firesim/new-conda
Browse files Browse the repository at this point in the history
Use conda-lock for dependencies
  • Loading branch information
abejgonzalez authored Aug 29, 2024
2 parents b51cc3e + 21119e5 commit d5a8b87
Show file tree
Hide file tree
Showing 9 changed files with 2,683 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ jobs:
run: |
cd ${{ env.REMOTE_WORK_DIR }}
eval "$(conda shell.bash hook)"
conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64
conda-lock install --conda $(which conda) -p $PWD/.conda-env
./scripts/setup-conda.sh
- name: Install Spike
run: |
cd ${{ env.REMOTE_WORK_DIR }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/weekly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
run: |
cd ${{ env.REMOTE_WORK_DIR }}
eval "$(conda shell.bash hook)"
conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64
conda-lock install --conda $(which conda) -p $PWD/.conda-env
./scripts/setup-conda.sh
- name: Initialize all submodules
run: |
cd ${{ env.REMOTE_WORK_DIR }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ boards/default/distros/ubuntu/rootfs.img*
.ropeproject
*~
*#
.conda-env
.conda-lock-env
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ To run FireMarshal independently, follow along from the next section (Standalone

FireMarshal uses the [Conda](https://docs.conda.io/en/latest/) package manager to help manage system dependencies.
This allows users to create an "environment" that holds system dependencies like ``make``, ``git``, etc.
Additionally, FireMarshal uses [Conda Lock](https://conda.github.io/conda-lock/) to generate lock files for Conda environments.
Please install Conda and Conda Lock using the Chipyard documentation [here](https://chipyard.readthedocs.io/en/main/Chipyard-Basics/Initial-Repo-Setup.html#default-requirements-installation).

Next you can run the following commands to create a FireMarshal environment called ``firemarshal`` with a RISC-V compatible toolchain:

```bash
conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64
conda-lock install --conda $(which conda) -n firemarshal
./scripts/setup-conda.sh --conda-env-name firemarshal
```

To enter this environment, you then run the ``activate`` command.
Expand Down
3 changes: 2 additions & 1 deletion conda-reqs.yaml → conda-reqs/conda-reqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ channels:
- ucb-bar
- nodefaults

# non-standard key used in conda-lock: https://github.com/conda-incubator/conda-lock#platform-specification
platforms:
- linux-64

dependencies:
# required for lockfile generation
- conda-lock=2.5.7
- qemu # from ucb-bar channel - https://github.com/ucb-bar/qemu-feedstock
- python>=3.9,<3.11
- rsync
Expand Down
Loading

0 comments on commit d5a8b87

Please sign in to comment.