Download setup_env.sh from ChatterjeeLab/moPPIt-v2: direct link, hf CLI and curl.
- Browser
- Download file 644 Bytes
-
https://huggingface.co/ChatterjeeLab/moPPIt-v2/resolve/main/setup_env.sh
- Command line
-
hf download hf://ChatterjeeLab/moPPIt-v2/setup_env.sh
-
curl -L -o setup_env.sh https://huggingface.co/ChatterjeeLab/moPPIt-v2/resolve/main/setup_env.sh
644 Bytes
| # Shell script to set environment variables when running code in this repository. | |
| # Usage: | |
| # source setup_env.sh | |
| # Activate conda env | |
| # shellcheck source=${HOME}/.bashrc disable=SC1091 | |
| source "${CONDA_SHELL}" | |
| if [ -z "${CONDA_PREFIX}" ]; then | |
| conda activate discdiff | |
| elif [[ "${CONDA_PREFIX}" != *"/discdiff" ]]; then | |
| conda deactivate | |
| conda activate discdiff | |
| fi | |
| # Setup HF cache | |
| # shellcheck disable=SC1091 | |
| export HF_HOME="${PWD}/.hf_cache" | |
| echo "HuggingFace cache set to '${HF_HOME}'." | |
| # Add root directory to PYTHONPATH to enable module imports | |
| export PYTHONPATH="${PWD}:${PWD}/guidance_eval:${HF_HOME}/modules" | |