forked from pytorch/rl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Make torchrl runnable without functorch and with gym==0.13 (p…
- Loading branch information
Showing
38 changed files
with
2,063 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
.circleci/unittest/linux_olddeps/scripts_gym_0_13/batch_scripts.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Runs a batch of scripts in a row to allow docker run to keep installed libraries | ||
# and env variables across runs. | ||
|
||
DIR="$(cd "$(dirname "$0")" && pwd)" | ||
|
||
$DIR/install.sh | ||
$DIR/run_test.sh | ||
$DIR/post_process.sh |
26 changes: 26 additions & 0 deletions
26
.circleci/unittest/linux_olddeps/scripts_gym_0_13/environment.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
channels: | ||
- pytorch | ||
- defaults | ||
dependencies: | ||
- pip | ||
- protobuf | ||
- pip: | ||
- hypothesis | ||
- future | ||
- cloudpickle | ||
- gym==0.13 | ||
- pygame | ||
- gym[atari] | ||
- moviepy | ||
- tqdm | ||
- pytest | ||
- pytest-cov | ||
- pytest-mock | ||
- pytest-instafail | ||
- expecttest | ||
- pyyaml | ||
- scipy | ||
- hydra-core | ||
- dm_control -e git+https://github.com/deepmind/dm_control.git@c053360edea6170acfd9c8f65446703307d9d352#egg={dm_control} | ||
- patchelf | ||
- pyopengl==3.1.4 |
45 changes: 45 additions & 0 deletions
45
.circleci/unittest/linux_olddeps/scripts_gym_0_13/install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
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. | ||
|
||
set -e | ||
|
||
eval "$(./conda/bin/conda shell.bash hook)" | ||
conda activate ./env | ||
|
||
#apt-get update -y && apt-get install git wget gcc g++ -y | ||
|
||
if [ "${CU_VERSION:-}" == cpu ] ; then | ||
cudatoolkit="cpuonly" | ||
version="cpu" | ||
else | ||
if [[ ${#CU_VERSION} -eq 4 ]]; then | ||
CUDA_VERSION="${CU_VERSION:2:1}.${CU_VERSION:3:1}" | ||
elif [[ ${#CU_VERSION} -eq 5 ]]; then | ||
CUDA_VERSION="${CU_VERSION:2:2}.${CU_VERSION:4:1}" | ||
fi | ||
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION ($CU_VERSION)" | ||
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" | ||
cudatoolkit="cudatoolkit=${version}" | ||
fi | ||
|
||
case "$(uname -s)" in | ||
Darwin*) os=MacOSX;; | ||
*) os=Linux | ||
esac | ||
|
||
# submodules | ||
git submodule sync && git submodule update --init --recursive | ||
|
||
printf "Installing PyTorch with %s\n" "${CU_VERSION}" | ||
if [ "${CU_VERSION:-}" == cpu ] ; then | ||
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cpuonly -c pytorch -y | ||
else | ||
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge -y | ||
fi | ||
|
||
printf "* Installing torchrl\n" | ||
python setup.py develop |
6 changes: 6 additions & 0 deletions
6
.circleci/unittest/linux_olddeps/scripts_gym_0_13/post_process.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
eval "$(./conda/bin/conda shell.bash hook)" | ||
conda activate ./env |
Oops, something went wrong.