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

Use conda-lock for dependencies #311

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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