Skip to content

Commit 65b7cbd

Browse files
authored
Merge pull request #8 from Fung-Lab/feature/installation
documentation: environment set-up and installation
2 parents edd54f4 + 29134b9 commit 65b7cbd

6 files changed

Lines changed: 67 additions & 25 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ venv/
109109
ENV/
110110
env.bak/
111111
venv.bak/
112+
env.yaml
112113

113114
# PyCharm (JetBrains)
114115
.idea/**/workspace.xml

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
1-
## Development
1+
## Usage
2+
3+
### Installation
4+
5+
1. Pre-install step:
6+
```
7+
pip install conda-merge
8+
```
9+
2. Create conda environment:
10+
1. GPU machines:
11+
```
12+
conda-merge env.common.yaml env.gpu.yaml > env.yaml
13+
conda env create -f env.yaml
14+
```
15+
16+
2. CPU-only machines:
17+
18+
1. M1 Macs (see https://github.com/pyg-team/pytorch_geometric/issues/4549):
19+
```
20+
conda env create -f env.common.yaml
21+
conda activate matdeeplearn
22+
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ pip install torch-scatter torch-sparse torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cpu.html
23+
```
24+
Note: if pip is using cached wheels and the build is failing, add `--no-cache-dir` flag.
225
3-
Install matdeeplearn with `pip install -e .`
26+
2. Everyone else:
27+
```
28+
conda-merge env.common.yaml env.cpu.yaml > env.yaml
29+
conda env create -f env.yaml
30+
```
31+
32+
3. Install package:
33+
```
34+
pip install -e .
35+
```
36+
37+
## Development
438
539
#### Code Quality
640
This project uses flake8, black, and isort for linting.

env.common.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: matdeeplearn
2+
channels:
3+
- pytorch
4+
- conda-forge
5+
- defaults
6+
dependencies:
7+
- python=3.9.*
8+
- pip
9+
- pytorch=1.12.1
10+
- pip:
11+
- pre-commit
12+
- numpy
13+
- scipy
14+
- ase=3.21.*
15+
- black
16+
- pandas

env.cpu.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dependencies:
2+
- cpuonly
3+
- pip:
4+
- -f https://data.pyg.org/whl/torch-1.12.0+cpu.html
5+
- torch-scatter
6+
- torch-sparse
7+
- torch-geometric

env.gpu.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dependencies:
2+
- cudatoolkit=11.3
3+
- pip:
4+
- -f https://data.pyg.org/whl/torch-1.12.0+cu113.html
5+
- torch-scatter
6+
- torch-sparse
7+
- torch-geometric

requirements.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)