Spaces:
Sleeping
Sleeping
Download dev-setup.sh from sethmcknight/msse-ai-engineering: direct link, hf CLI and curl.
- Browser
- Download file 829 Bytes
-
https://huggingface.co/spaces/sethmcknight/msse-ai-engineering/resolve/main/dev-setup.sh
- Command line
-
hf download hf://spaces/sethmcknight/msse-ai-engineering/dev-setup.sh
-
curl -L -o dev-setup.sh https://huggingface.co/spaces/sethmcknight/msse-ai-engineering/resolve/main/dev-setup.sh
829 Bytes
| # dev-setup.sh - create a reproducible development environment (pyenv + venv) | |
| # Usage: ./dev-setup.sh [python-version] | |
| set -euo pipefail | |
| PYTHON_VERSION=${1:-3.11.4} | |
| echo "Using python version: ${PYTHON_VERSION}" | |
| if ! command -v pyenv >/dev/null 2>&1; then | |
| echo "pyenv not found. Install via Homebrew: brew install pyenv" | |
| exit 1 | |
| fi | |
| pyenv install -s "${PYTHON_VERSION}" | |
| pyenv local "${PYTHON_VERSION}" | |
| # Recreate venv | |
| rm -rf venv | |
| pyenv exec python -m venv venv | |
| # Activate and install | |
| # shellcheck source=/dev/null | |
| source venv/bin/activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r requirements.txt | |
| if [ -f dev-requirements.txt ]; then | |
| python -m pip install -r dev-requirements.txt | |
| fi | |
| echo "Development environment ready. Activate with: source venv/bin/activate" | |