Use lean conda for faster initial setup
This commit is contained in:
48
conda-reqs/chipyard-lean.yaml
Normal file
48
conda-reqs/chipyard-lean.yaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
channels:
|
||||||
|
- ucb-bar
|
||||||
|
- conda-forge
|
||||||
|
- litex-hub
|
||||||
|
- nodefaults
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- linux-64
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
# https://conda-forge.org/feedstock-outputs/
|
||||||
|
# filterable list of all conda-forge packages
|
||||||
|
# https://conda-forge.org/#contribute
|
||||||
|
# instructions on adding a recipe
|
||||||
|
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/pkg-specs.html#package-match-specifications
|
||||||
|
# documentation on package_spec syntax for constraining versions
|
||||||
|
|
||||||
|
|
||||||
|
# handy tool for introspecting package relationships and file ownership
|
||||||
|
# see https://github.com/rvalieris/conda-tree
|
||||||
|
- conda-tree
|
||||||
|
|
||||||
|
# bundle FireSim driver with deps into installer shell-script
|
||||||
|
- constructor
|
||||||
|
|
||||||
|
- gcc<12
|
||||||
|
- gxx<12
|
||||||
|
- sysroot_linux-64=2.17 # needed to match pre-built CI XRT glibc version
|
||||||
|
- conda-gcc-specs
|
||||||
|
- binutils
|
||||||
|
|
||||||
|
# misc
|
||||||
|
- autoconf
|
||||||
|
- pre-commit
|
||||||
|
- readline
|
||||||
|
- coreutils
|
||||||
|
- jq
|
||||||
|
- pip
|
||||||
|
|
||||||
|
# firemarshal deps
|
||||||
|
- sbt
|
||||||
|
- openjdk=20
|
||||||
|
- dtc
|
||||||
|
- verilator==5.020
|
||||||
|
- screen
|
||||||
|
- elfutils
|
||||||
|
- libdwarf-dev==0.0.0.20190110_28_ga81397fc4 # from ucb-bar channel - using mainline libdwarf-feedstock
|
||||||
|
- conda-lock=1.4
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -38,6 +38,7 @@ usage() {
|
|||||||
echo " --help -h : Display this message"
|
echo " --help -h : Display this message"
|
||||||
echo " --verbose -v : Verbose printout"
|
echo " --verbose -v : Verbose printout"
|
||||||
echo " --use-unpinned-deps -ud : Use unpinned conda environment"
|
echo " --use-unpinned-deps -ud : Use unpinned conda environment"
|
||||||
|
echo " --use-lean-conda : Install a leaner version of conda (no firesim && no marshal)"
|
||||||
|
|
||||||
echo " --skip -s N : Skip step N in the list above. Use multiple times to skip multiple steps ('-s N -s M ...')."
|
echo " --skip -s N : Skip step N in the list above. Use multiple times to skip multiple steps ('-s N -s M ...')."
|
||||||
echo " --skip-conda : Skip Conda initialization (step 1)"
|
echo " --skip-conda : Skip Conda initialization (step 1)"
|
||||||
@@ -57,6 +58,7 @@ TOOLCHAIN_TYPE="riscv-tools"
|
|||||||
VERBOSE=false
|
VERBOSE=false
|
||||||
VERBOSE_FLAG=""
|
VERBOSE_FLAG=""
|
||||||
USE_UNPINNED_DEPS=false
|
USE_UNPINNED_DEPS=false
|
||||||
|
USE_LEAN_CONDA=false
|
||||||
SKIP_LIST=()
|
SKIP_LIST=()
|
||||||
|
|
||||||
# getopts does not support long options, and is inflexible
|
# getopts does not support long options, and is inflexible
|
||||||
@@ -70,6 +72,9 @@ do
|
|||||||
--verbose | -v)
|
--verbose | -v)
|
||||||
VERBOSE_FLAG=$1
|
VERBOSE_FLAG=$1
|
||||||
set -x ;;
|
set -x ;;
|
||||||
|
--use-lean-conda)
|
||||||
|
USE_LEAN_CONDA=true
|
||||||
|
SKIP_LIST+=(4 6 7 8 9) ;;
|
||||||
-ud | --use-unpinned-deps )
|
-ud | --use-unpinned-deps )
|
||||||
USE_UNPINNED_DEPS=true ;;
|
USE_UNPINNED_DEPS=true ;;
|
||||||
--skip | -s)
|
--skip | -s)
|
||||||
@@ -161,13 +166,22 @@ if run_step "1"; then
|
|||||||
CONDA_REQS=$CYDIR/conda-reqs
|
CONDA_REQS=$CYDIR/conda-reqs
|
||||||
CONDA_LOCK_REQS=$CONDA_REQS/conda-lock-reqs
|
CONDA_LOCK_REQS=$CONDA_REQS/conda-lock-reqs
|
||||||
# must match with the file generated by generate-conda-lockfile.sh
|
# must match with the file generated by generate-conda-lockfile.sh
|
||||||
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
|
if [ "$USE_LEAN_CONDA" = false ]; then
|
||||||
|
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
|
||||||
|
else
|
||||||
|
if [ "$TOOLCHAIN_TYPE" != "riscv-tools" ]; then
|
||||||
|
echo "::ERROR:: Lean conda env is not supported for esp-tools"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64-lean.conda-lock.yml
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$USE_UNPINNED_DEPS" = true ]; then
|
if [ "$USE_UNPINNED_DEPS" = true ]; then
|
||||||
# auto-gen the lockfiles
|
# auto-gen the lockfiles
|
||||||
$CYDIR/scripts/generate-conda-lockfiles.sh
|
$CYDIR/scripts/generate-conda-lockfiles.sh
|
||||||
exit_if_last_command_failed
|
exit_if_last_command_failed
|
||||||
fi
|
fi
|
||||||
|
echo "lockfile $LOCKFILE"
|
||||||
|
|
||||||
# use conda-lock to create env
|
# 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 &&
|
||||||
|
|||||||
@@ -16,11 +16,20 @@ for TOOLCHAIN_TYPE in riscv-tools esp-tools; do
|
|||||||
rm -rf $LOCKFILE
|
rm -rf $LOCKFILE
|
||||||
|
|
||||||
conda-lock \
|
conda-lock \
|
||||||
--no-mamba \
|
--no-mamba \
|
||||||
--no-micromamba \
|
--no-micromamba \
|
||||||
-f "$REQS_DIR/chipyard.yaml" \
|
-f "$REQS_DIR/chipyard.yaml" \
|
||||||
-f "$REQS_DIR/docs.yaml" \
|
-f "$REQS_DIR/docs.yaml" \
|
||||||
-f "$REQS_DIR/$TOOLCHAIN_TYPE.yaml" \
|
-f "$REQS_DIR/$TOOLCHAIN_TYPE.yaml" \
|
||||||
-p linux-64 \
|
-p linux-64 \
|
||||||
--lockfile $LOCKFILE
|
--lockfile $LOCKFILE
|
||||||
done
|
done
|
||||||
|
|
||||||
|
conda-lock \
|
||||||
|
--no-mamba \
|
||||||
|
--no-micromamba \
|
||||||
|
-f "$REQS_DIR/chipyard-lean.yaml" \
|
||||||
|
-f "$REQS_DIR/docs.yaml" \
|
||||||
|
-f "$REQS_DIR/riscv-tools.yaml" \
|
||||||
|
-p linux-64 \
|
||||||
|
--lockfile $REQS_DIR/conda-lock-reqs/conda-requirements-riscv-tools-linux-64-lean.conda-lock.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user