Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Feb 28, 2025
2 parents f312387 + 3400c88 commit 70da33a
Show file tree
Hide file tree
Showing 56 changed files with 661 additions and 303 deletions.
8 changes: 3 additions & 5 deletions .github/unittest/linux_libs/scripts_ataridqn/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ unset PYTORCH_VERSION
# For unittest, nightly PyTorch is used as the following section,
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.
apt-get update && apt-get install -y git wget gcc g++
#apt-get update && apt-get install -y git wget freeglut3 freeglut3-dev

set -e

Expand All @@ -28,18 +26,18 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu124"
printf "Installing PyTorch with cu128"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu124 -U
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu124
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
fi
else
printf "Failed to install pytorch"
Expand Down
26 changes: 23 additions & 3 deletions .github/unittest/linux_libs/scripts_ataridqn/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,31 @@
set -e
set -v

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Avoid error: "fatal: unsafe repository"
apt-get update && apt-get install -y git wget gcc g++ unzip curl

apt-get update && apt-get upgrade -y && apt-get install -y git
# Avoid error: "fatal: unsafe repository"
git config --global --add safe.directory '*'
apt-get install -y wget \
gcc \
g++ \
unzip \
curl \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2

# Upgrade specific package
apt-get upgrade -y libstdc++6

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand Down
6 changes: 3 additions & 3 deletions .github/unittest/linux_libs/scripts_brax/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu124"
printf "Installing PyTorch with cu128"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu124 -U
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch --index-url https://download.pytorch.org/whl/cpu -U
else
pip3 install torch --index-url https://download.pytorch.org/whl/cu124
pip3 install torch --index-url https://download.pytorch.org/whl/cu128
fi
else
printf "Failed to install pytorch"
Expand Down
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_brax/run_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -euxo pipefail

yum makecache
yum install -y glfw glew mesa-libGL mesa-libGL-devel mesa-libOSMesa-devel egl-utils freeglut
apt update
apt install -y libglfw3 libglfw3-dev libglew-dev libgl1-mesa-glx libgl1-mesa-dev mesa-common-dev libegl1-mesa-dev freeglut3 freeglut3-dev

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
bash ${this_dir}/setup_env.sh
Expand Down
23 changes: 22 additions & 1 deletion .github/unittest/linux_libs/scripts_brax/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,30 @@

set -euxo pipefail

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
apt-get update && apt-get upgrade -y && apt-get install -y git
# Avoid error: "fatal: unsafe repository"
git config --global --add safe.directory '*'
apt-get install -y wget \
gcc \
g++ \
unzip \
curl \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2

# Upgrade specific package
apt-get upgrade -y libstdc++6

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand Down
22 changes: 19 additions & 3 deletions .github/unittest/linux_libs/scripts_chess/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ unset PYTORCH_VERSION
# For unittest, nightly PyTorch is used as the following section,
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.
apt-get update && apt-get install -y \
git \
wget \
gcc \
g++ \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2

set -e

Expand All @@ -25,18 +41,18 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu124"
printf "Installing PyTorch with cu128"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu124 -U
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu124
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
fi
else
printf "Failed to install pytorch"
Expand Down
22 changes: 19 additions & 3 deletions .github/unittest/linux_libs/scripts_chess/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,27 @@ set -e
set -v

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
yum install cairo-devel -y

apt-get update && apt-get upgrade -y && apt-get install -y git
# Avoid error: "fatal: unsafe repository"

git config --global --add safe.directory '*'
apt-get install -y wget \
gcc \
g++ \
unzip \
curl \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2 \
libcairo2-dev

root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand Down
8 changes: 3 additions & 5 deletions .github/unittest/linux_libs/scripts_d4rl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ unset PYTORCH_VERSION
# For unittest, nightly PyTorch is used as the following section,
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.
apt-get update && apt-get install -y git wget gcc g++
#apt-get update && apt-get install -y git wget freeglut3 freeglut3-dev

set -e

Expand All @@ -28,18 +26,18 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu124"
printf "Installing PyTorch with cu128"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu124 -U
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch --index-url https://download.pytorch.org/whl/cu124
pip3 install torch --index-url https://download.pytorch.org/whl/cu128
fi
else
printf "Failed to install pytorch"
Expand Down
35 changes: 30 additions & 5 deletions .github/unittest/linux_libs/scripts_d4rl/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,33 @@ set -e
set -v

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
apt-get update && apt-get upgrade -y && apt-get install -y git
# Avoid error: "fatal: unsafe repository"
apt-get update && apt-get install -y git wget gcc g++ unzip

git config --global --add safe.directory '*'
apt-get install -y wget \
gcc \
g++ \
unzip \
curl \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2

# Upgrade specific package
apt-get upgrade -y libstdc++6

cd /usr/lib/x86_64-linux-gnu
ln -s libglut.so.3.12 libglut.so.3
cd $this_dir

root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand Down Expand Up @@ -78,9 +101,9 @@ pip3 install pip --upgrade
if [[ $OSTYPE == 'darwin'* ]]; then
PRIVATE_MUJOCO_GL=glfw
elif [ "${CU_VERSION:-}" == cpu ]; then
PRIVATE_MUJOCO_GL=osmesa
PRIVATE_MUJOCO_GL=egl
else
PRIVATE_MUJOCO_GL=osmesa
PRIVATE_MUJOCO_GL=egl
fi

export MUJOCO_GL=$PRIVATE_MUJOCO_GL
Expand All @@ -94,6 +117,8 @@ conda env config vars set \
SDL_VIDEODRIVER=dummy \
MUJOCO_GL=$PRIVATE_MUJOCO_GL \
PYOPENGL_PLATFORM=$PRIVATE_MUJOCO_GL \
TOKENIZERS_PARALLELISM=true
TOKENIZERS_PARALLELISM=true \
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6


conda env update --file "${this_dir}/environment.yml" --prune
4 changes: 2 additions & 2 deletions .github/unittest/linux_libs/scripts_envpool/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu124"
printf "Installing PyTorch with cu128"
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu124 -U
pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi

# smoke test
Expand Down
30 changes: 27 additions & 3 deletions .github/unittest/linux_libs/scripts_envpool/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,31 @@
# Do not install PyTorch and torchvision here, otherwise they also get cached.

set -e

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
apt-get update && apt-get upgrade -y && apt-get install -y git
# Avoid error: "fatal: unsafe repository"
git config --global --add safe.directory '*'
apt-get install -y wget \
gcc \
g++ \
unzip \
curl \
patchelf \
libosmesa6-dev \
libgl1-mesa-glx \
libglfw3 \
swig3.0 \
libglew-dev \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libgles2


# Upgrade specific package
apt-get upgrade -y libstdc++6

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand Down Expand Up @@ -47,7 +68,10 @@ pip install pip --upgrade

conda env update --file "${this_dir}/environment.yml" --prune

yum install -y mesa-libGL
apt update
conda env config vars set \
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 \
MUJOCO_GL=egl

conda deactivate
conda activate "${env_dir}"
Expand Down
8 changes: 3 additions & 5 deletions .github/unittest/linux_libs/scripts_gen-dgrl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ unset PYTORCH_VERSION
# For unittest, nightly PyTorch is used as the following section,
# so no need to set PYTORCH_VERSION.
# In fact, keeping PYTORCH_VERSION forces us to hardcode PyTorch version in config.
apt-get update && apt-get install -y git wget gcc g++
#apt-get update && apt-get install -y git wget freeglut3 freeglut3-dev

set -e

Expand All @@ -28,18 +26,18 @@ fi
# submodules
git submodule sync && git submodule update --init --recursive

printf "Installing PyTorch with cu124"
printf "Installing PyTorch with cu128"
if [[ "$TORCH_VERSION" == "nightly" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U
else
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu124 -U
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 -U
fi
elif [[ "$TORCH_VERSION" == "stable" ]]; then
if [ "${CU_VERSION:-}" == cpu ] ; then
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
else
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu124
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128
fi
else
printf "Failed to install pytorch"
Expand Down
Loading

0 comments on commit 70da33a

Please sign in to comment.