Installation
DeepChem Server can be installed and run using Docker (recommended) or manually from source. Docker provides the simplest setup with all dependencies pre-configured.
Docker Installation (Recommended)
Docker provides containerized deployment with all dependencies managed automatically.
Prerequisites
Docker installed on your system
Docker Compose (included with Docker Desktop)
Steps
Clone the Repository
git clone <repository-url> cd deepchem-server
Start the Server
Use the provided helper script for easy setup:
./docker.sh
Available Options:
./docker.sh
Examples:
# Use default CPU setup ./docker.sh # Use GPU setup ./docker.sh -f Dockerfile.gpu
Verify Installation
Check that the server is running:
curl http://localhost:8000/healthcheckExpected response:
{"status": "ok"}Access the interactiveAPI documentation at: http://localhost:8000/docs
Available Dockerfiles
Dockerfile: CPU-based setup using micromamba base image
Dockerfile.gpu: GPU-accelerated setup using NVIDIA PyTorch base image
Dockerfile Features:
Uses micromamba for fast package management
Includes all DeepChem dependencies
Optimized for CPU-based molecular machine learning
Health check endpoint configured
Dockerfile.gpu Features:
NVIDIA PyTorch base image with CUDA support
GPU-accelerated DeepChem operations
Compatible with NVIDIA Docker runtime
Optimized for large-scale molecular modeling
Manual Installation
For development or custom deployments, install DeepChem Server manually using micromamba.
Prerequisites
micromamba package manager (lightweight conda replacement)
Python 3.11 (specified in environment file)
Git for cloning the repository
Steps
Clone the Repository
git clone <repository-url> cd deepchem-server
Create Environment from YAML
Use the provided environment file to create a consistent environment:
micromamba env create -f deepchem_server/environments/core_environment.yml
Activate Environment
micromamba activate deepchem-server-env
Start the Server
For development with auto-reload:
cd deepchem_server uvicorn main:app --host 0.0.0.0 --port 8000 --reload
Or use the development script:
./start-dev-server.sh
Configuration
Environment Management
Environment File:
deepchem_server/environments/core_environment.ymlPython Version: 3.11
Package Manager: micromamba for dependency management
Environment Variables
DATADIR: Data directory path (default:/opt/deepchem_server_app/datain Docker)PYTHONPATH: Python path for module imports
Port Configuration
Default port is 8000. To change:
# Docker
docker run -p 8080:8000 deepchem-server
# Manual
uvicorn main:app --port 8080
Verification
After installation, verify the setup:
Health Check
curl http://localhost:8000/healthcheckAPI Documentation
Visit http://localhost:8000/docs for interactive API documentation
Test Upload
cd pyds/tests python test_upload_featurize.py
Getting Help
If you encounter issues:
Check server logs for error messages
Verify micromamba environment is correctly created and activated
Ensure system meets minimum requirements
Verify Python version is 3.11 as specified in environment file
Consult the FastAPI documentation for deployment questions
Check the DeepChem documentation for primitive operations