Skip to content

Commit 41dc464

Browse files
Merge pull request #126 from lukemartinlogan/main
Docker iowarp improvements
2 parents 33669f7 + d529b84 commit 41dc464

File tree

1 file changed

+63
-40
lines changed

1 file changed

+63
-40
lines changed

docs/11-iowarp/01-index.mdx

Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ podman exec -it iowarp bash
138138

139139
</TabItem>
140140

141-
<TabItem value="docker-user" label="Manual Docker (Any)">
141+
<TabItem value="docker-user" label="Docker (Any)">
142142

143143
### Clone the IOWarp Install Repo
144144

@@ -147,6 +147,14 @@ cd ${HOME}
147147
git clone https://github.com/iowarp/iowarp-install.git
148148
```
149149

150+
<Tabs>
151+
<TabItem value="pull" label="Pull" default>
152+
### Pull prebuilt containers
153+
```bash
154+
docker pull iowarp/iowarp-user:latest
155+
```
156+
</TabItem>
157+
<TabItem value="manual" label="Manual" default>
150158
### Create the containers
151159

152160
```bash
@@ -164,17 +172,18 @@ docker tag iowarp-deps iowarp/iowarp-deps:latest
164172
docker build --no-cache -t iowarp-user . -f iowarp-user.Dockerfile
165173
docker tag iowarp-user iowarp/iowarp-user:latest
166174
```
175+
</TabItem>
176+
</Tabs>
167177

168-
### Create Docker Compose File
178+
### Run the container
169179

170180
```bash
171-
mkdir ~/iowarp-docker
172-
cd ~/iowarp-docker
173-
nano docker-compose.yml
181+
cd ~/iowarp-install/docker/user
182+
docker compose up -d # Only for recent dockers
183+
docker-compose up -d # Only for older dockers
174184
```
175185

176-
Add the following:
177-
186+
For reference, the user docker-compose.yml contains:
178187
```yaml
179188
services:
180189
iowarp:
@@ -187,17 +196,17 @@ services:
187196
network_mode: host
188197
```
189198
190-
### Run the container
199+
### Access the Container
191200
192201
```bash
193-
docker compose up -d # Only for recent dockers
194-
docker-compose up -d # Only for older dockers
202+
docker exec -it iowarp bash
195203
```
196204

197-
### Access the Container
198-
205+
### Example test
206+
The following will run an example iowarp unit test:
199207
```bash
200-
docker exec -it iowarp bash
208+
cd ~/iowarp-install/docker
209+
docker build --no-cache -t iowarp-test . -f iowarp-test.Dockerfile
201210
```
202211

203212
</TabItem>
@@ -215,13 +224,13 @@ PPI, or some other runtime plugin.
215224
### Project Environment
216225

217226
Decide on where you want to place your iowarp repos.
218-
This guide will assume you have set a variable named IOWARP_PKGS.
227+
This guide will assume you have set a variable named IOWARP.
219228

220229
```bash
221-
export IOWARP_PKGS="${HOME}"
230+
export IOWARP="${HOME}"
222231
```
223232

224-
Set IOWARP_PKGs to where you want your packages.
233+
Set IOWARP to where you want your packages.
225234

226235
NOTE: This variable needs to be reset for every new terminal.
227236
On Linux, you could add the above command to your `~/.bashrc`
@@ -230,14 +239,14 @@ to automate.
230239
### Clone the IOWarp Spack Repo
231240

232241
```bash
233-
cd ${IOWARP_PKGS}
242+
cd ${IOWARP}
234243
git clone https://github.com/iowarp/iowarp-install.git
235244
```
236245

237246
### Clone the repos
238247

239248
```bash
240-
cd ${IOWARP_PKGS}
249+
cd ${IOWARP}
241250
git clone https://github.com/iowarp/cte-hermes-shm.git
242251
git clone https://github.com/iowarp/iowarp-runtime
243252
git clone https://github.com/iowarp/content-transfer-engine.git
@@ -272,7 +281,7 @@ source ~/.bashrc
272281
#### Add iowarp to spack
273282

274283
```bash
275-
spack repo add ${IOWARP_PKGS}/iowarp-install/iowarp-spack
284+
spack repo add ${IOWARP}/iowarp-install/iowarp-spack
276285
```
277286

278287
#### Install Dependencies
@@ -292,36 +301,50 @@ that streamline the installation of our tools.
292301

293302
<TabItem value="docker-dev" label="Dockerfiles (Any)">
294303

295-
#### Build Containers
304+
<Tabs>
305+
<TabItem value="pull" label="Pull" default>
306+
#### Pull prebuilt containers
307+
```bash
308+
docker pull iowarp/iowarp-user:latest
309+
```
310+
</TabItem>
311+
<TabItem value="manual" label="Manual" default>
312+
#### Create the containers
296313

297314
```bash
315+
cd ~/iowarp-install/docker
298316
# iowarp-base
299317
docker build --no-cache -t iowarp-base . -f iowarp-base.Dockerfile
300318
docker tag iowarp-base iowarp/iowarp-base:latest
301319
# iowarp-deps-spack
302320
docker build --no-cache -t iowarp-deps-spack . -f iowarp-deps-spack.Dockerfile
303321
docker tag iowarp-deps-spack iowarp/iowarp-deps-spack:latest
322+
```
323+
</TabItem>
324+
</Tabs>
325+
326+
#### Build Dependency Container
327+
328+
We will rebuild this container so that jarvis introspects your machine:
329+
```bash
304330
# iowarp-deps
305331
docker build --no-cache -t iowarp-deps . -f iowarp-deps.Dockerfile
306332
docker tag iowarp-deps iowarp/iowarp-deps:latest
307-
#iowarp-user
308-
docker build --no-cache -t iowarp-user . -f iowarp-user.Dockerfile
309-
docker tag iowarp-user iowarp/iowarp-user:latest
310333
```
311334

312335
#### Launch Docker Compose
313336

314337
```bash
315-
mkdir -p ${IOWARP_PKGS}/docker
316-
cp -r ${IOWARP_PKGS}/iowarp-install/docker/development ${IOWARP_PKGS}/docker
317-
cd ${IOWARP_PKGS}/docker/development
338+
mkdir -p ${IOWARP}/docker
339+
cp -r ${IOWARP}/iowarp-install/docker/development ${IOWARP}/docker
340+
cd ${IOWARP}/docker/development
318341
# Copy-paste the above into the file
319342
docker compose up -d # Only for recent dockers
320343
docker-compose up -d # Only for older dockers
321344
```
322345

323-
Feel free to edit `${IOWARP_PKGS}/docker/development/docker-compose.yml`.
324-
It assumes the environment variable `${IOWARP_PKGS}` is set.
346+
Feel free to edit `${IOWARP}/docker/development/docker-compose.yml`.
347+
It assumes the environment variable `${IOWARP}` is set.
325348

326349
NOTE: `shm_size` and `mem_limit` are set to 8GB. Feel free to increase or decrease
327350
that value.
@@ -356,11 +379,11 @@ Make sure to try and update all your packages:
356379
```bash
357380
cd ~/iowarp-install
358381
git pull
359-
cd ${IOWARP_PKGS}/cte-hermes-shm
382+
cd ${IOWARP}/cte-hermes-shm
360383
git pull
361-
cd ${IOWARP_PKGS}/iowarp-runtime
384+
cd ${IOWARP}/iowarp-runtime
362385
git pull
363-
cd ${IOWARP_PKGS}/content-transfer-engine
386+
cd ${IOWARP}/content-transfer-engine
364387
git pull
365388
```
366389

@@ -370,18 +393,18 @@ If you find that things are failing to build for you
370393
after an update, try destroying all build directories.
371394

372395
```bash
373-
cd ${IOWARP_PKGS}/cte-hermes-shm
396+
cd ${IOWARP}/cte-hermes-shm
374397
rm -rf build
375-
cd ${IOWARP_PKGS}/iowarp-runtime
398+
cd ${IOWARP}/iowarp-runtime
376399
rm -rf build
377-
cd ${IOWARP_PKGS}/content-transfer-engine
400+
cd ${IOWARP}/content-transfer-engine
378401
rm -rf build
379402
```
380403

381404
### Hermes-SHM
382405

383406
```bash
384-
cd ${IOWARP_PKGS}/cte-hermes-shm
407+
cd ${IOWARP}/cte-hermes-shm
385408
scspkg create hermes_shm
386409
mkdir build
387410
cd build
@@ -399,15 +422,15 @@ fork instead of cloning directly. The following will allow
399422
you to keep your fork updated with changes to the global repo.
400423

401424
```bash
402-
cd ${IOWARP_PKGS}/cte-hermes-shm
425+
cd ${IOWARP}/cte-hermes-shm
403426
git remote add iowarp https://github.com/iowarp/cte-hermes-shm.git
404427
git pull iowarp
405428
```
406429

407430
### IOWarp Runtime: Chimaera
408431

409432
```bash
410-
cd ${IOWARP_PKGS}/iowarp-runtime
433+
cd ${IOWARP}/iowarp-runtime
411434
scspkg create iowarp_runtime
412435
module unload iowarp_runtime
413436
module load hermes_shm
@@ -423,15 +446,15 @@ fork instead of cloning directly. The following will allow
423446
you to keep your fork updated with changes to the global repo.
424447

425448
```bash
426-
cd ${IOWARP_PKGS}/iowarp-runtime
449+
cd ${IOWARP}/iowarp-runtime
427450
git remote add iowarp https://github.com/iowarp/iowarp-runtime
428451
git pull iowarp
429452
```
430453

431454
### Content-Transfer-Engine: Hermes
432455

433456
```bash
434-
cd ${IOWARP_PKGS}/content-transfer-engine
457+
cd ${IOWARP}/content-transfer-engine
435458
scspkg create cte
436459
module unload cte
437460
module load hermes_shm iowarp_runtime
@@ -447,7 +470,7 @@ fork instead of cloning directly. The following will allow
447470
you to keep your fork updated with changes to the global repo.
448471

449472
```bash
450-
cd ${IOWARP_PKGS}/content-transfer-engine
473+
cd ${IOWARP}/content-transfer-engine
451474
git remote add iowarp https://github.com/iowarp/content-transfer-engine.git
452475
git pull iowarp
453476
```

0 commit comments

Comments
 (0)