Skip to content

Commit

Permalink
Some more.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbau committed Sep 10, 2021
1 parent 56de48f commit aaf6549
Show file tree
Hide file tree
Showing 12 changed files with 402 additions and 0 deletions.
26 changes: 26 additions & 0 deletions script/benv11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: benv11
channels:
- pytorch
- ostrokach-forge
- conda-forge
dependencies:
- python=3.6
- cudatoolkit=11.1
- pytorch=1.8
- cudnn
- torchvision
- mkl-include
- numpy
- scipy
- scikit-learn
- scikit-image
- matplotlib
- seaborn
- numba
- opencv
- jupyter
- jupyterlab
- pyyaml
- mkl
- tqdm
- pip
36 changes: 36 additions & 0 deletions script/p3t13tf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: p3t13tf
channels:
- pytorch
- anaconda
- conda-forge
dependencies:
- python=3.6
- cudatoolkit=10.0
- cudnn=7.6
- pytorch=1.3.1
- tensorflow-gpu=1.14
- torchvision
- mkl-include
- numpy
- scipy
- moviepy
- lmdb
- h5py
- pillow
- py-opencv
- scikit-learn
- matplotlib
- graphviz
- numba
- jupyter
- pyyaml
- mkl
- requests
- six
- setuptools
- cmake
- cffi
- ujson
- tqdm
- pip

2 changes: 2 additions & 0 deletions script/p3t14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ dependencies:
- h5py
- visdom
- jsonpatch
- yacs
- pytest
- pip:
- webp
1 change: 1 addition & 0 deletions script/p3t15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ dependencies:
- h5py
- visdom
- jsonpatch
- pytest
- pip:
- webp
44 changes: 44 additions & 0 deletions script/p3t16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: p3t16
channels:
- pytorch
- ostrokach-forge
- conda-forge
dependencies:
- python=3.6
- cudatoolkit=10.1
- cudnn=7.6.0
- pytorch=1.6
- torchvision
- torchaudio
- munch
- mkl-include
- numpy
- scipy
- scikit-learn
- scikit-image
- matplotlib
- pandas
- graphviz
- numba
- jupyter
- pyyaml
- opencv
- mkl
- connexion
- setuptools
- cmake
- cffi
- ujson
- tqdm
- pip
- cairo
- tensorboard
- tensorboardX
- graph-tool
- cython
- h5py
- visdom
- jsonpatch
- pytest
- pip:
- webp
38 changes: 38 additions & 0 deletions script/p3tf14.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: p3tf14
channels:
- pytorch
- anaconda
- conda-forge
dependencies:
- python>=3.6
- cudatoolkit=10.1
- cudnn=7.6.5
- pytorch=1.5.1
- tensorflow-gpu=1.14.0
- tensorboard
- tensorboardX
- torchvision
- mkl-include
- numpy
- scipy
- moviepy
- lmdb
- h5py
- pillow
- py-opencv
- scikit-learn
- matplotlib
- graphviz
- numba
- jupyter
- pyyaml
- mkl
- requests
- six
- setuptools
- cmake
- cffi
- ujson
- tqdm
- pip

20 changes: 20 additions & 0 deletions script/placesdemo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: placesdemo
channels:
- pytorch
- ostrokach-forge
- conda-forge
dependencies:
- python=3.6
- pytorch=1.4
- torchvision
- py-opencv
- mkl-include
- numpy
- scipy
- scikit-learn
- scikit-image
- matplotlib
- pandas
- numba
- mkl
- h5py
51 changes: 51 additions & 0 deletions script/setup_benv11.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# Bash script to set up an anaconda python-based deep learning environment
# that has support for pytorch, tensorflow, pycaffe in the same environment,
# long with juypter, scipy etc.

# This should not require root. However, it does copy and build a lot of
# binaries into your ~/.conda directory. If you do not want to store
# these in your homedir disk, then ~/.conda can be a symlink somewhere else.
# (At MIT CSAIL, you should symlink ~/.conda to a directory on NFS or local
# disk instead of leaving it on AFS, or else you will exhaust your quota.)

# Start from parent directory of script
cd "$(dirname "$(dirname "$(readlink -f "$0")")")"

# Default RECIPE 'benv11' can be overridden by 'RECIPE=foo setup.sh'
RECIPE=${RECIPE:-benv11}
# Default ENV_NAME 'benv' can be overridden by 'ENV_NAME=foo setup.sh'
ENV_NAME="${ENV_NAME:-${RECIPE}}"
echo "Creating conda environment ${ENV_NAME}"

if [[ ! $(type -P conda) ]]
then
echo "conda not in PATH"
echo "read: https://conda.io/docs/user-guide/install/index.html"
exit 1
fi

if df "${HOME}/.conda" --type=afs > /dev/null 2>&1
then
echo "Not installing: your ~/.conda directory is on AFS."
echo "Use 'ln -s /some/nfs/dir ~/.conda' to avoid using up your AFS quota."
exit 1
fi

# Uninstall existing environment
source deactivate
rm -rf ~/.conda/envs/${ENV_NAME}

# Build new environment: torch and torch vision from source
# CUDA_HOME is needed
# https://github.com/rusty1s/pytorch_scatter/issues/19#issuecomment-449735614
conda env create --name=${ENV_NAME} -f setup/${RECIPE}.yml

# Set up CUDA_HOME to set itself up correctly on every source activate
# https://stackoverflow.com/questions/31598963
mkdir -p ~/.conda/envs/${ENV_NAME}/etc/conda/activate.d
echo "export CUDA_HOME=/usr/local/cuda-11.1" > ~/.conda/envs/${ENV_NAME}/etc/conda/activate.d/CUDA_HOME.sh

source activate ${ENV_NAME}

51 changes: 51 additions & 0 deletions script/setup_p3t13tf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash

# Bash script to set up an anaconda python-based deep learning environment
# that has support for pytorch, tensorflow, pycaffe in the same environment,
# long with juypter, scipy etc.

# This should not require root. However, it does copy and build a lot of
# binaries into your ~/.conda directory. If you do not want to store
# these in your homedir disk, then ~/.conda can be a symlink somewhere else.
# (At MIT CSAIL, you should symlink ~/.conda to a directory on NFS or local
# disk instead of leaving it on AFS, or else you will exhaust your quota.)

# Start from parent directory of script
cd "$(dirname "$(dirname "$(readlink -f "$0")")")"

# Default RECIPE 'p3t13tf' can be overridden by 'RECIPE=foo setup.sh'
RECIPE=${RECIPE:-p3t13tf}
# Default ENV_NAME 'p3t13tf' can be overridden by 'ENV_NAME=foo setup.sh'
ENV_NAME="${ENV_NAME:-${RECIPE}}"
echo "Creating conda environment ${ENV_NAME}"

if [[ ! $(type -P conda) ]]
then
echo "conda not in PATH"
echo "read: https://conda.io/docs/user-guide/install/index.html"
exit 1
fi

if df "${HOME}/.conda" --type=afs > /dev/null 2>&1
then
echo "Not installing: your ~/.conda directory is on AFS."
echo "Use 'ln -s /some/nfs/dir ~/.conda' to avoid using up your AFS quota."
exit 1
fi

# Uninstall existing environment
source deactivate
rm -rf ~/.conda/envs/${ENV_NAME}

# Build new environment: torch and torch vision from source
# CUDA_HOME is needed
# https://github.com/rusty1s/pytorch_scatter/issues/19#issuecomment-449735614
conda env create --name=${ENV_NAME} -f script/${RECIPE}.yml

# Set up CUDA_HOME to set itself up correctly on every source activate
# https://stackoverflow.com/questions/31598963
mkdir -p ~/.conda/envs/${ENV_NAME}/etc/conda/activate.d
echo "export CUDA_HOME=/usr/local/cuda-10.0" > \
~/.conda/envs/${ENV_NAME}/etc/conda/activate.d/CUDA_HOME.sh

source activate ${ENV_NAME}
82 changes: 82 additions & 0 deletions script/setup_p3t16.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Bash script to set up an anaconda python-based deep learning environment
# that has support for pytorch, tensorflow, pycaffe in the same environment,
# long with juypter, scipy etc.

# This should not require root. However, it does copy and build a lot of
# binaries into your ~/.conda directory. If you do not want to store
# these in your homedir disk, then ~/.conda can be a symlink somewhere else.
# (At MIT CSAIL, you should symlink ~/.conda to a directory on NFS or local
# disk instead of leaving it on AFS, or else you will exhaust your quota.)

# Start from parent directory of script
cd "$(dirname "$(dirname "$(readlink -f "$0")")")"

# Default RECIPE 'p3t16' can be overridden by 'RECIPE=foo setup.sh'
RECIPE=${RECIPE:-p3t16}
# Default ENV_NAME 'p3t15' can be overridden by 'ENV_NAME=foo setup.sh'
ENV_NAME="${ENV_NAME:-${RECIPE}}"
echo "Creating conda environment ${ENV_NAME}"

if [[ ! $(type -P conda) ]]
then
echo "conda not in PATH"
echo "read: https://conda.io/docs/user-guide/install/index.html"
exit 1
fi

if df "${HOME}/.conda" --type=afs > /dev/null 2>&1
then
echo "Not installing: your ~/.conda directory is on AFS."
echo "Use 'ln -s /some/nfs/dir ~/.conda' to avoid using up your AFS quota."
exit 1
fi

# Uninstall existing environment
source deactivate
rm -rf ~/.conda/envs/${ENV_NAME}

# Build new environment
# CUDA_HOME is needed
# https://github.com/rusty1s/pytorch_scatter/issues/19#issuecomment-449735614
conda env create --name=${ENV_NAME} -f script/${RECIPE}.yml

# Set up CUDA_HOME to set itself up correctly on every source activate
# https://stackoverflow.com/questions/31598963
mkdir -p ~/.conda/envs/${ENV_NAME}/etc/conda/activate.d
echo "export CUDA_HOME=/usr/local/cuda-10.1" > \
~/.conda/envs/${ENV_NAME}/etc/conda/activate.d/CUDA_HOME.sh

source activate ${ENV_NAME}

# Now build pytorch and torchvision from source
#export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
#conda uninstall -y pytorch
#pip uninstall -y torch
## Repair this missing symlink
## pushd $(dirname $(which caffe))/../lib
## ln -s libgflags.so.2.2 libgflags.so.2
## popd
#PYTORCH_SRC="${HOME}/.conda/envs/${ENV_NAME}/source/pytorch"
#mkdir -p "${PYTORCH_SRC}"
#git clone --depth 1 --recursive \
# --branch 'release/1.6' \
# https://github.com/pytorch/pytorch \
# "${PYTORCH_SRC}"
#pushd "${PYTORCH_SRC}"
## Cross-compile for all common NVIDIA hardware, not just this machine's.
#CMAKE_PREFIX_PATH="${HOME}/.conda/envs/${ENV_NAME}/" \
#TORCH_CUDA_ARCH_LIST="3.5;5.2;6.1;7.0;7.0+PTX;7.5" \
#MAX_JOBS=12 \
#python setup.py install
#popd
#TVISION_SRC="${HOME}/.conda/envs/${ENV_NAME}/source/torchvision"
#mkdir -p "${TVISION_SRC}"
#git clone --depth 1 --recursive --branch v0.5.1 \
# https://github.com/pytorch/vision \
# "${TVISION_SRC}"
#pushd "${TVISION_SRC}"
#MKLROOT="${HOME}/.conda/envs/${ENV_NAME}/" \
#TORCH_CUDA_ARCH_LIST="3.5;5.2;6.1;7.0;7.0+PTX;7.5" \
#MAX_JOBS=12 \
#python setup.py install
#popd
Loading

0 comments on commit aaf6549

Please sign in to comment.