@@ -12,16 +12,16 @@ A Project Mercury Endeavor.
12
12
13
13
If contributing to this repository, please make sure to do the following:
14
14
15
- + Read the instructions in [ ` CONTRIBUTING.md ` ] ( ./CONTRIBUTING.md )
15
+ + Read the instructions in [ ` CONTRIBUTING.md ` ] ( ./CONTRIBUTING.md ) - Notably, before committing to the repository, * make
16
+ sure to set up your dev environment and pre-commit install (` pre-commit install ` )!*
16
17
17
18
+ Install and activate the Conda Environment using the ` QUICKSTART ` instructions below.
18
19
19
20
+ On installing new dependencies (via ` pip ` or ` conda ` ), please make sure to update the ` environment-<ID>.yaml ` files
20
21
via the following command (note that you need to separately create the ` environment-cpu.yaml ` file by exporting from
21
22
your local development environment!):
22
23
23
- `rm environments/environment-<ID >.yaml; conda env export --no-builds |
24
- grep -v "^prefix: " > environments/environment-<ID >.yaml`
24
+ ` make serialize-env --arch=<cpu | gpu> `
25
25
26
26
---
27
27
@@ -32,40 +32,69 @@ Clones `mistral` to the working directory, then walks through dependency setup,
32
32
` transformers ` repo, you may have to refresh the ` transformers ` install via `pip install git+https://github.com
33
33
/huggingface/transformers`. On any shared resources (NLP Cluster, DGX Boxes) @Sidd will monitor this.
34
34
35
- ### GPU & Cluster Environments (Shared Resources )
35
+ ### Shared NLP Environment (Stanford Folks )
36
36
37
- Ensure that you're using the appropriate ` environment-<ID>.yaml ` file --> if PyTorch doesn't build properly for your
38
- setup, checking the CUDA Toolkit is usually a good place to start. We have ` environment-<ID>.yaml ` files for CUDA
39
- 10.1, 11 (and any additional support can be added -- file an issue if necessary) .
37
+ Note for @ Stanford folks - the NLP Cluster (with the DGX Boxes pending) have all of the following Conda environments
38
+ already set up - the only necessary steps are cloning the repo, activating the appropriate env, and running the
39
+ ` pre-commit install ` command .
40
40
41
- ---
41
+ #### Interactive Session (from a Jagupard Machine) -- Direct Development on Cluster
42
42
43
- ## Start-Up (from Scratch)
43
+ ``` bash
44
+ cd /nlp/scr/$USER # Replace $USER with you!
45
+ git clone https://github.com/stanford-mercury/mistral.git
46
+ cd mistral
47
+ conda activate mistral
48
+ pre-commit install # Important!
49
+ ```
44
50
45
- Use these commands if you're starting a repository from scratch (this shouldn't be necessary to use this repo, but is
46
- included for completeness). If you're just trying to run/use this code, look at the Quickstart section above.
51
+ ### Local Development - Linux w/ GPU & CUDA 11.0
47
52
48
- ### GPU & Cluster Environments (CUDA 10.1, 11.0)
53
+ Note: Assumes that ` conda ` (Miniconda or Anaconda are both fine) is installed and on your path.
49
54
50
- CUDA 10.1 & 11.0 (note only CUDA Toolkit dependency version needs to change for building the below).
55
+ Ensure that you're using the appropriate ` environment-<gpu | cpu>.yaml ` file --> if PyTorch doesn't build properly for
56
+ your setup, checking the CUDA Toolkit is usually a good place to start. We have ` environment-<gpu>.yaml ` files for CUDA
57
+ 11.0 (and any additional CUDA Toolkit support can be added -- file an issue if necessary).
51
58
52
59
``` bash
53
- conda create --name mistral-10.1 python=3.8
54
- conda install pytorch torchvision torchaudio cudatoolkit=10.1 -c pytorch # CUDA=10.1 on NLP Cluster
55
- conda install ipython jupyter
60
+ git clone https://github.com/stanford-mercury/mistral.git
61
+ cd mistral
62
+ conda env create -f environments/environment-gpu.yaml # Choose CUDA Kernel based on Hardware!
63
+ conda activate mistral
64
+ pre-commit install # Important!
65
+ ```
56
66
57
- pip install black datasets flake8 h5py hydra-core hydra_colorlog isort matplotlib pre-commit
67
+ ### Local Development - CPU (Mac OS & Linux)
58
68
59
- # Install Bleeding-Edge Transformers Library!
60
- pip install git+https://github.com/huggingface/transformers
69
+ Note: Assumes that ` conda ` (Miniconda or Anaconda are both fine) is installed and on your path. Use the ` -cpu `
70
+ environment file.
71
+
72
+ ``` bash
73
+ git clone https://github.com/stanford-mercury/mistral.git
74
+ cd mistral
75
+ conda env create -f environments/environment-cpu.yaml
76
+ conda activate mistral
77
+ pre-commit install # Important!
61
78
```
62
79
80
+ ---
81
+
82
+ ## Start-Up (from Scratch)
83
+
84
+ Use these commands if you're starting a repository from scratch (this shouldn't be necessary to use this repo, but is
85
+ included for completeness). If you're just trying to run/use this code, look at the Quickstart section above.
86
+
87
+ ### GPU & Cluster Environments (CUDA 11.0)
88
+
63
89
``` bash
64
- conda create --name mistral-11.0 python=3.8
65
- conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch # CUDA=11.0 on DGX Boxes, GCP/AWS
90
+ conda create --name mistral python=3.8
91
+ conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch # CUDA=11.0 on most of Cluster!
66
92
conda install ipython jupyter
67
93
68
- pip install black datasets flake8 h5py hydra-core hydra_colorlog isort matplotlib pre-commit
94
+ pip install black datasets flake8 h5py isort matplotlib pre-commit
95
+
96
+ # Install Bleeding-Edge Quinine Library!
97
+ pip install git+https://github.com/krandiash/quinine.git
69
98
70
99
# Install Bleeding-Edge Transformers Library!
71
100
pip install git+https://github.com/huggingface/transformers
@@ -76,11 +105,14 @@ pip install git+https://github.com/huggingface/transformers
76
105
Similar to the above, but installs the CPU-only versions of Torch and similar dependencies.
77
106
78
107
``` bash
79
- conda create --name mistral-cpu python=3.8
108
+ conda create --name mistral python=3.8
80
109
conda install pytorch torchvision torchaudio -c pytorch
81
110
conda install ipython jupyter
82
111
83
- pip install black datasets flake8 h5py hydra-core hydra_colorlog isort matplotlib pre-commit
112
+ pip install black datasets flake8 h5py isort matplotlib pre-commit
113
+
114
+ # Install Bleeding-Edge Quinine Library!
115
+ pip install git+https://github.com/krandiash/quinine.git
84
116
85
117
# Install Bleeding-Edge Transformers Library!
86
118
pip install git+https://github.com/huggingface/transformers
0 commit comments