#!/usr/bin/env bash # aspire2a 环境准备(A100 40G 单卡; python 3.10) set -euo pipefail cd "$(dirname "$0")/.." if ! command -v conda >/dev/null 2>&1; then echo "需要 conda"; exit 1; fi conda create -n AdcSR python=3.10 -y || true source "$(conda info --base)/etc/profile.d/conda.sh" conda activate AdcSR pip install --upgrade pip pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121 pip install -r official/requirements.txt pip install diffusers transformers accelerate peft omegaconf tqdm pyyaml pyiqa lpips scikit-image imageio pillow numpy pip install huggingface_hub hf_transfer safetensors gdown pip install "dwt-pytorch" 2>/dev/null || pip install pywavelets || true python - <<'EOF' try: import pywt; print("pywt ok") except Exception as e: print("pywt missing:", e) EOF echo "setup done"