forked from deepchem/deepchem
-
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
1 parent
86042a0
commit d2ac5f8
Showing
4 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dependencies: | ||
- pip: | ||
- jax[cpu] |
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,4 @@ | ||
dependencies: | ||
- pip: | ||
- -f https://storage.googleapis.com/jax-releases/jax_releases.html | ||
- jax[cuda111] |
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,11 @@ | ||
dependencies: | ||
- pip: | ||
- -f https://download.pytorch.org/whl/torch_stable.html | ||
- -f https://pytorch-geometric.com/whl/torch-1.9.0+cu111.html | ||
- -f https://data.dgl.ai/wheels/repo.html | ||
- dgl-cu111 | ||
- torch==1.9.0+cu111 | ||
- torchvision==0.10.0+cu111 | ||
- torch-scatter | ||
- torch-sparse | ||
|
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,60 @@ | ||
# This script creates the new deepchem enviroment | ||
# This script works on only Bash and Zsh | ||
|
||
CMDNAME=`basename ${BASH_SOURCE:-$0}` | ||
if [ $# -ne 3 ]; then | ||
echo "Please set two arguments." | ||
echo "Usage) source $CMDNAME python_version cpu_or_gpu" 1>&2 | ||
echo "Example) source $CMDNAME 3.8 gpu tensorflow" 1>&2 | ||
return 1 | ||
fi | ||
|
||
# This command is nearly equal to `conda init` command | ||
# Need to use `conda activate` command | ||
eval "$(conda shell.bash hook)" | ||
|
||
# Create deepchem environment | ||
conda config --set always_yes yes | ||
conda create --name deepchem python=$1 | ||
conda install -c conda-forge conda-merge | ||
|
||
if [ "$2" = "gpu" ]; | ||
then | ||
# We expect the CUDA vesion is 10.1. | ||
if [ "$3" = "tensorflow" ]; | ||
then | ||
conda-merge $PWD/requirements/tensorflow/env_tensorflow.yml > $PWD/env.yml | ||
echo "Installing Tensorflow environment with GPU" | ||
elif [ "$3" = "pytorch" ]; | ||
then | ||
conda-merge $PWD/requirements/pytorch/env_pytorch.yml $PWD/requirements/pytorch/env_pytorch.gpu.yml > $PWD/env.yml | ||
echo "Installing pytorch environment with GPU" | ||
elif [ "$3" = "jax" ]; | ||
then | ||
conda-merge $PWD/requirements/jax/env_jax.yml $PWD/requirements/jax/env_jax.gpu.yml > $PWD/env.yml | ||
echo "Installing jax environment with GPU" | ||
else | ||
conda-merge $PWD/requirements/env_common.yml > $PWD/env.yml | ||
echo "Installing common environment with GPU" | ||
fi | ||
else | ||
# We expect the CUDA vesion is 10.1. | ||
if [ "$3" = "tensorflow" ]; | ||
then | ||
conda-merge $PWD/requirements/tensorflow/env_tensorflow.yml > $PWD/env.yml | ||
echo "Installing Tensorflow environment with CPU" | ||
elif [ "$3" = "pytorch" ]; | ||
then | ||
conda-merge $PWD/requirements/pytorch/env_pytorch.yml $PWD/requirements/pytorch/env_pytorch.cpu.yml > $PWD/env.yml | ||
echo "Installing pytorch environment with CPU" | ||
elif [ "$3" = "jax" ]; | ||
then | ||
conda-merge $PWD/requirements/jax/env_jax.yml $PWD/requirements/jax/env_jax.cpu.yml > $PWD/env.yml | ||
echo "Installing jax environment with CPU" | ||
else | ||
conda-merge $PWD/requirements/env_common.yml > $PWD/env.yml | ||
echo "Installing common environment with CPU" | ||
fi | ||
fi | ||
# Install all dependencies | ||
conda env update --file $PWD/env.yml |