Skip to content

Commit 2ef8915

Browse files
author
Vincent Moens
committed
[Setup] Making tensordict pytorch-agnostic
ghstack-source-id: e087676 Pull Request resolved: #1256
1 parent cb81b5e commit 2ef8915

File tree

16 files changed

+159
-47
lines changed

16 files changed

+159
-47
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
yum update gcc
4+
yum update libstdc++
5+
6+
${CONDA_RUN} conda install -c conda-forge pybind11 -y

.github/scripts/version_script.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
set TENSORDICT_BUILD_VERSION=0.7.0
33
echo TENSORDICT_BUILD_VERSION is set to %TENSORDICT_BUILD_VERSION%
44

5+
if "%CONDA_RUN%"=="" (
6+
echo CONDA_RUN is not set. Please activate your conda environment or set CONDA_RUN.
7+
exit /b 1
8+
)
9+
10+
:: Run the pip install command
11+
%CONDA_RUN% conda install -c conda-forge pybind11 -y
12+
513
@echo on
614

715
set VC_VERSION_LOWER=17

.github/scripts/version_script.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/bin/bash
22

33
export TENSORDICT_BUILD_VERSION=0.7.0
4+
5+
${CONDA_RUN} conda install -c conda-forge pybind11 -y

.github/scripts/win-pre-script.bat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@echo off
2+
:: Check if CONDA_RUN is set, if not, set it to a default value
3+
if "%CONDA_RUN%"=="" (
4+
echo CONDA_RUN is not set. Please activate your conda environment or set CONDA_RUN.
5+
exit /b 1
6+
)
7+
8+
:: Run the pip install command
9+
%CONDA_RUN% conda install -c conda-forge pybind11 -y
10+
11+
:: Check if the installation was successful
12+
if errorlevel 1 (
13+
echo Failed to install cmake and pybind11.
14+
exit /b 1
15+
) else (
16+
echo Successfully installed cmake and pybind11.
17+
)

.github/unittest/linux/scripts/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ dependencies:
1919
- coverage
2020
- h5py
2121
- orjson
22+
- ninja

.github/unittest/linux/scripts/setup_env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ pip install pip --upgrade
5252

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

55+
conda install anaconda::cmake -y
56+
conda install -c conda-forge pybind11 -y
57+
5558
#if [[ $OSTYPE == 'darwin'* ]]; then
5659
# printf "* Installing C++ for OSX\n"
5760
# conda install -c conda-forge cxx-compiler -y

.github/unittest/linux_torchrec/scripts/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ dependencies:
1818
- coverage
1919
- h5py
2020
- orjson
21+
- ninja

.github/unittest/linux_torchrec/scripts/setup_env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ cat "${this_dir}/environment.yml"
4545
pip install pip --upgrade
4646

4747
conda env update --file "${this_dir}/environment.yml" --prune
48+
49+
conda install anaconda::cmake -y
50+
conda install -c conda-forge pybind11 -y

.github/unittest/rl_linux_optdeps/scripts/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ dependencies:
1616
- pyyaml
1717
- scipy
1818
- orjson
19+
- ninja

.github/unittest/rl_linux_optdeps/scripts/setup_env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ pip install pip --upgrade
5858

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

61+
conda install anaconda::cmake -y
62+
conda install -c conda-forge pybind11 -y
63+
6164
#yum makecache
6265
#yum -y install glfw-devel
6366
#yum -y install libGLEW

0 commit comments

Comments
 (0)