Skip to content

Commit

Permalink
fixup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
buggy213 committed Feb 8, 2024
1 parent 0be6fe4 commit f128828
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build-custom-bmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
bash << "EOF"
source ./env.sh
export PATH="/home/ff/cs152/sp22/lab1-install/bin:$PATH"
cd /scratch/${USER}/chipyard/generators/riscv-sodor/test/custom-bmarks
cd /scratch/${USER}/chipyard-cs152-sp24/generators/riscv-sodor/test/custom-bmarks
make
make run
make dump
Expand Down
2 changes: 1 addition & 1 deletion build-custom-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
bash << "EOF"
source ./env.sh
export PATH="/home/ff/cs152/sp22/lab1-install/bin:$PATH"
cd /scratch/${USER}/chipyard/generators/riscv-sodor/test/custom-tests
cd /scratch/${USER}/chipyard-cs152-sp24/generators/riscv-sodor/test/custom-tests
make
EOF
37 changes: 20 additions & 17 deletions scripts/build-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,29 @@ function exit_if_last_command_failed
if run_step "1"; then
begin_step "1" "Conda environment setup"
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
CONDA_REQS=$CYDIR/conda-reqs
CONDA_LOCK_REQS=$CONDA_REQS/conda-lock-reqs
# CONDA_REQS=$CYDIR/conda-reqs
# CONDA_LOCK_REQS=$CONDA_REQS/conda-lock-reqs
# must match with the file generated by generate-conda-lockfile.sh
if [ "$USE_LEAN_CONDA" = false ]; then
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
else
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64-lean.conda-lock.yml
fi

if [ "$USE_UNPINNED_DEPS" = true ]; then
# auto-gen the lockfiles
$CYDIR/scripts/generate-conda-lockfiles.sh
exit_if_last_command_failed
fi
echo "Using lockfile: $LOCKFILE"
# if [ "$USE_LEAN_CONDA" = false ]; then
# LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
# else
# LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64-lean.conda-lock.yml
# fi

# if [ "$USE_UNPINNED_DEPS" = true ]; then
# # auto-gen the lockfiles
# $CYDIR/scripts/generate-conda-lockfiles.sh
# exit_if_last_command_failed
# fi
# echo "Using lockfile: $LOCKFILE"

# use conda-lock to create env
conda-lock install --conda $(which conda) -p $CYDIR/.conda-env $LOCKFILE &&
# conda-lock install --conda $(which conda) -p $CYDIR/.conda-env $LOCKFILE &&

ln -s /home/ff/cs152/sp24/chipyard/.conda-env .conda-env

source $(conda info --base)/etc/profile.d/conda.sh &&
conda activate $CYDIR/.conda-env
conda activate $CYDIR/.conda-env/
exit_if_last_command_failed

# Conda Setup
Expand All @@ -202,7 +205,7 @@ END_CONDA_ACTIVATE

replace_content env.sh build-setup-conda "# line auto-generated by $0
$CONDA_ACTIVATE_PREAMBLE
conda activate $CYDIR/.conda-env
conda activate $CYDIR/.conda-env/
source $CYDIR/scripts/fix-open-files.sh"

fi
Expand Down

0 comments on commit f128828

Please sign in to comment.