Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·87 lines (74 loc) · 1.98 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·87 lines (74 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env bash
set -euo pipefail
# This script assumes:
# 1) conda create -n RDiffusion python=3.10
# 2) conda activate RDiffusion
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "[1/6] Preparing pip tooling..."
python -m pip install --upgrade "pip<24.1" "setuptools<60" wheel
echo "[2/6] Installing core numerical/runtime dependencies..."
python -m pip install \
numpy==1.24.4 \
scipy==1.10.1 \
pandas==1.3.1 \
scikit-learn==1.3.2 \
tqdm==4.66.5 \
biopython==1.79 \
einops==0.8.1 \
pillow==10.2.0 \
requests==2.32.4 \
fsspec==2024.6.1 \
packaging==25.0 \
protobuf==3.17.3 \
regex==2021.10.8 \
PyYAML==5.4.1
echo "[3/6] Installing PyTorch stack (matching RDiffusion env major versions)..."
python -m pip install \
torch==2.4.1 \
torchvision==0.19.1 \
torchaudio==2.4.1 \
pytorch-lightning==1.9.3 \
torchmetrics==1.5.2 \
tensorboard==2.6.0 \
accelerate==0.16.0 \
ninja==1.13.0
echo "[4/6] Installing NLP/model dependencies..."
python -m pip install \
tokenizers==0.20.3 \
transformers==4.46.3 \
huggingface-hub==0.36.0 \
safetensors==0.5.3 \
ptflops==0.7.3
echo "[5/6] Installing fairseq-compatible dependencies..."
python -m pip install \
hydra-core==1.0.7 \
omegaconf==2.0.6 \
fairseq==0.12.2
echo "[Optional] Installing geometric dependencies for ts task (best effort)..."
set +e
python -m pip install torch-geometric==2.6.1
TS_GEOM_RC=$?
set -e
if [[ $TS_GEOM_RC -ne 0 ]]; then
echo "[WARN] torch-geometric install failed. Non-ts tasks can still run."
echo "[WARN] For ts task, install torch-scatter/torch-cluster/torch-sparse wheels matching your torch build."
fi
echo "[6/6] Quick runtime check..."
python - <<'PY'
import importlib
mods = [
"torch",
"pytorch_lightning",
"transformers",
"fairseq",
"numpy",
"sklearn",
"tqdm",
]
for m in mods:
importlib.import_module(m)
print("Core dependency import check passed.")
PY
python inference.py --help >/dev/null
echo "RDiffusion install finished. inference.py --help passed."