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.
- Loading branch information
0 parents
commit 240975b
Showing
165 changed files
with
32,669 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 | ||
- cmake >= 3.18 | ||
- pip: | ||
- hypothesis | ||
- protobuf | ||
- future | ||
- cloudpickle | ||
- gym_retro | ||
- gym | ||
- pygame | ||
- gym[accept-rom-license] | ||
- gym[atari] | ||
- moviepy | ||
- tqdm | ||
- pytest | ||
- pytest-cov | ||
- pytest-mock | ||
- expecttest | ||
- pyyaml | ||
- scipy | ||
- dm_control | ||
- mujoco_py |
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,62 @@ | ||
#!/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 | ||
|
||
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" "${cudatoolkit}" | ||
#if [ "${os}" == "MacOSX" ]; then | ||
# conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest | ||
#else | ||
# conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch[build="*${version}*"] "${cudatoolkit}" pytest | ||
#fi | ||
|
||
#printf "Installing PyTorch with %s\n" "${CU_VERSION}" | ||
if [ "${CU_VERSION:-}" == cpu ] ; then | ||
# conda install -y pytorch torchvision cpuonly -c pytorch-nightly | ||
# use pip to install pytorch as conda can frequently pick older release | ||
pip install torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html --pre | ||
else | ||
conda install -y pytorch torchvision cudatoolkit=10.2 -c pytorch-nightly | ||
fi | ||
|
||
printf "Installing functorch\n" | ||
pip install ninja # Makes the build go faster | ||
pip install "git+https://github.com/pytorch/functorch.git" | ||
|
||
# smoke test | ||
python -c "import functorch" | ||
|
||
printf "* Installing torchrl\n" | ||
python setup.py develop | ||
|
||
# smoke test | ||
python -c "import torchrl" |
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.