Skip to content

Commit fd46120

Browse files
committed
docs update
1 parent 0655b92 commit fd46120

File tree

1 file changed

+73
-34
lines changed

1 file changed

+73
-34
lines changed

docs/installation.rst

Lines changed: 73 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,51 @@ To install with pdf output:
4242
$ pip install pyhdx==0.4.0b8[pdf]
4343
4444
45+
Install from source
46+
-------------------
47+
48+
Create a new conda environment:
49+
50+
.. code-block::
51+
52+
$ conda create --name py38_pyhdx python=3.8
53+
# conda activate py38_pyhdx
54+
55+
Clone the github repository:
56+
57+
.. code-block:: rst
58+
59+
$ git clone https://github.com/Jhsmit/PyHDX
60+
$ cd PyHDX
61+
62+
Generate conda requirements files from `setup.cfg`:
63+
64+
.. code-block:: rst
65+
66+
$ python _requirements.py
67+
68+
Install the base dependencies and optional extras. For example, to install PyHDX with web app:
69+
70+
.. code-block:: rst
71+
72+
$ conda install --file _req-base.txt --file _req-web.txt
73+
74+
To run the web application:
75+
76+
.. code-block::
77+
78+
$ python pyhdx/web/serve.py
79+
80+
This runs the pyhx web application without a Dask cluster to submit jobs to, so
81+
submitting a fitting job will give an error.
82+
83+
To start a dask cluster separately, open another terminal tab and run:
84+
85+
.. code-block:: rst
86+
87+
python local_cluster.py
4588
4689
47-
4890
4991
Running the web server
5092
----------------------
@@ -76,68 +118,65 @@ This will start a Dask cluster on the scheduler address as specified in the PyHD
76118
(user dir / .pyhdx folder)
77119

78120

79-
From sources
80-
------------
121+
Install from source
122+
-------------------
81123

82-
1. Clone the PyHDX repository and cd into the project's root directory:
83-
.. code-block:: rst
124+
Create a new conda environment:
84125

85-
git clone https://github.com/Jhsmit/PyHDX.git
86-
cd PyHDX
126+
.. code-block::
87127
128+
$ conda create --name py38_pyhdx python=3.8
129+
# conda activate py38_pyhdx
88130
89-
2. Create a ``conda`` environment
131+
Clone the github repository:
90132

91-
.. code-block:: rst
133+
.. code-block:: rst
92134
93-
conda create --name <name> python=3.8
135+
$ git clone https://github.com/Jhsmit/PyHDX
136+
$ cd PyHDX
94137
95-
3. Activate conda environment
138+
Generate conda requirements files `from setup.cfg`:
96139

97-
.. code-block:: rst
140+
.. code-block:: rst
98141
99-
conda activate <name>
142+
$ python _requirements.py
100143
101-
4. Install PyTorch
102144
103-
If you would like a specific PyTorch version to use with PyHDX (ie CUDA/ROCm support), you should install this first.
145+
First, if you would like a specific PyTorch version to use with PyHDX (ie CUDA/ROCm support), you should install this first.
104146
Installation instructions are on the Pytorch_ website.
105147

106-
5. Install other dependencies
148+
Then, install the other base dependencies and optional extras. For example, to install PyHDX with web app:
149+
150+
.. code-block:: rst
107151
108-
.. code-block:: rst
152+
$ conda install --file _req-base.txt --file _req-web.txt
109153
110-
conda install -c conda-forge pyhdx=0.4.0b7 --only-deps``
154+
Optionally, install PyHDX in develop/editable mode
111155

112-
This install dependencies only for base PyHDX. To install web application dependencies,
113-
run the `_requirements.py` file in the PyHDX root folder. This generates `reqs-<extra>.txt` files which lists
114-
requirements.
156+
.. code-block:: rst
115157
116-
.. code-block:: rst
117-
python _requirements.py
118-
pip install -r reqs-base.txt -r req-web.txt -r req-web.txt
158+
conda develop .
119159
120-
Or
160+
To run the web application:
121161

122-
.. code-block:: rst
123-
python _requirements.py
124-
conda install --file reqs-base.txt --file req-web.txt --file req-web.txt
162+
.. code-block::
125163
164+
$ python pyhdx/web/serve.py
126165
127-
6. Install PyHDX in editable / development mode
166+
This runs the pyhx web application without a Dask cluster to submit jobs to, so
167+
submitting a fitting job will give an error.
128168

129-
.. code-block:: rst
169+
To start a dask cluster separately, open another terminal tab and run:
130170

131-
conda develop .
171+
.. code-block:: rst
132172
133-
.. code-block:: rst
173+
python local_cluster.py
134174
135-
pip install -e .
136175
137176
Dependencies
138177
------------
139178

140-
The requirements for PyHDX are listed in setup.cfg
179+
The requirements for PyHDX and its extras are listed in setup.cfg
141180

142181
.. _Github repo: https://github.com/Jhsmit/pyhdx
143182

0 commit comments

Comments
 (0)