Installation¶
Stable version¶
Caution!! : The latest stable version was published nearly a year ago. If you are a pip user or you face some errors, we recommend the nightly build version.
If you’d like to install DeepChem locally, we recommend using
conda
and installing RDKit with deepchem.
RDKit is a soft requirement package, but many useful methods like
molnet depend on it.
pip install tensorflow-gpu==1.14
conda install -y -c conda-forge rdkit deepchem
For CPU only support instead run
pip install tensorflow==1.14
conda install -y -c conda-forge rdkit deepchem
Nightly build version¶
You install the nightly build version via pip. The nightly version is built by the HEAD of DeepChem.
pip install tensorflow==2.3.*
pip install --pre deepchem
RDKit is a soft requirement package, but many useful methods like molnet depend on it. We recommend installing RDKit with deepchem if you use conda.
conda install -y -c conda-forge rdkit
Google Colab¶
The fastest way to get up and running with DeepChem is to run it on Google Colab. Check out one of the DeepChem Tutorials or this forum post for Colab quick start guides.
Docker¶
If you want to install using a docker, you can pull two kinds of images from DockerHub.
deepchemio/deepchem:x.x.x
Image built by using a conda (x.x.x is a version of deepchem)
This image is built when we push x.x.x. tag
Dockerfile is put in docker/conda-forge directory
deepchemio/deepchem:latest
Image built from source codes
This image is built every time we commit to the master branch
Dockerfile is put in docker/master directory
First, you pull the image you want to use.
docker pull deepchemio/deepchem:2.3.0
Then, you create a container based on the image.
docker run --rm -it deepchemio/deepchem:2.3.0
If you want GPU support:
# If nvidia-docker is installed
nvidia-docker run --rm -it deepchemio/deepchem:2.3.0
docker run --runtime nvidia --rm -it deepchemio/deepchem:2.3.0
# If nvidia-container-toolkit is installed
docker run --gpus all --rm -it deepchemio/deepchem:2.3.0
You are now in a docker container which deepchem was installed. You can start playing with it in the command line.
(deepchem) root@xxxxxxxxxxxxx:~/mydir# python
Python 3.6.10 |Anaconda, Inc.| (default, May 8 2020, 02:54:21)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import deepchem as dc
If you want to check the tox21 benchmark:
# you can run our tox21 benchmark
(deepchem) root@xxxxxxxxxxxxx:~/mydir# wget https://raw.githubusercontent.com/deepchem/deepchem/master/examples/benchmark.py
(deepchem) root@xxxxxxxxxxxxx:~/mydir# python benchmark.py -d tox21 -m graphconv -s random
From source with conda¶
Installing via these steps will ensure you are installing from the source.
Prerequisite
Shell: Bash, Zsh, PowerShell
Conda: >4.6
First, please clone the deepchem repository from GitHub.
git clone https://github.com/deepchem/deepchem.git
cd deepchem
Then, execute the shell script. The shell scripts require two arguments, python version and gpu/cpu.
source scripts/install_deepchem_conda.sh 3.7 cpu
If you want GPU support (we supports only CUDA 10.1):
source scripts/install_deepchem_conda.sh 3.7 gpu
If you are using the Windows and the PowerShell:
. .\scripts\install_deepchem_conda.ps1 3.7 cpu
(XXXX)
in your command line.conda init <YOUR_SHELL_NAME>
to activate it, then:conda activate deepchem
pip install -e .
pytest -m "not slow" deepchem # optional