-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathinstall.sh
More file actions
31 lines (24 loc) · 919 Bytes
/
install.sh
File metadata and controls
31 lines (24 loc) · 919 Bytes
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
#!/bin/bash
set -e
# PufferLib standalone installer
# Assumes Ubuntu 24.04 with CUDA 13.0 drivers already installed
apt-get update && apt-get install -y \
curl git build-essential clang \
htop gdb tmux ccache \
libomp-dev libglfw3 libgl1-mesa-dev python3.12-dev \
libnccl2 libnccl-dev
# python -> python3 symlink if missing
if ! command -v python &>/dev/null; then
ln -s "$(which python3)" /usr/local/bin/python
fi
curl -LsSf https://astral.sh/uv/install.sh | sh
. "$HOME/.local/bin/env"
uv venv --python 3.12 venv
. venv/bin/activate
git clone https://github.com/pufferai/pufferlib --branch 4.0
cd pufferlib
CUDA_VER=$(nvcc --version 2>/dev/null | grep -oP 'release \K\d+\.\d+' | tr -d '.')
uv pip install torch --extra-index-url "https://download.pytorch.org/whl/cu${CUDA_VER:-130}"
uv pip install -e .
bash build.sh breakout
echo "Done. Test your installation with: puffer train breakout"