Skip to content

Commit

Permalink
dockerfile how to
Browse files Browse the repository at this point in the history
  • Loading branch information
lastephey committed May 18, 2021
1 parent 3183880 commit 3f3a62f
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions DockerfileREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,52 @@ The image is called `registry.nersc.gov/das/delta:3.0`.

As a backup, there is also an image that has delta installed inside: `registry.nersc.gov/das/delta-inside:1.0`


### Haswell

```
salloc -N 4 -C haswell -q interactive --image=registry.nersc.gov/das/delta:3.0
```

cd to wherever you have installed delta. For me it's

```
cd /global/cscratch1/sd/stephey/delta/delta
```

And then launch delta:


```
OMP_NUM_THREADS=16 srun -n 16 -c 16 --cpu-bind=cores shifter python3 -m mpi4py.futures processor.py --config configs/hackathon_test.json --transport transport_tx --num_ranks_preprocess=4 --num_ranks_analysis=12 --num_queue_threads=4 --run_id=test_25259_GT
```


### corigpu

On corigpu, request the image during your interactive job:

```
module load cgpu
salloc -N 1 -C gpu -G 1 -t 120 -A m499 --image=registry.nersc.gov/das/delta:3.0
```

On Cori, `module unload cgpu` and adjust your salloc/sbatch accordingly.
```
OMP_NUM_THREADS=16 srun -n 16 -c 1 --cpu-bind=cores shifter python3 -m mpi4py.futures processor.py --config configs/hackathon_test.json --transport transport_tx --num_ranks_preprocess=2 --num_ranks_analysis=2 --num_queue_threads=2 --run_id=test_25259_GT
To open a shell inside the container and run tests/scripts inside:
### Debugging inside the container
```
shifter --volume="/global/cscratch1/sd/stephey/delta:/opt/delta" /bin/bash
shifter /bin/bash
```
The `--volume` command will bind-mount your delta installation into
`/opt/delta` inside the image. Note that the bind location `/opt/delta` must
exist inside the image.
### Known issues
To use shifter to run your tests/scripts:
Pytest has trouble running in the bind-mounted configuration for reasons I
don't understand. To run pytest you'll have to run in the container:
shifter --volume="/global/cscratch1/sd/stephey/delta:/opt/delta" ls /opt/delta/tests
```
shifter --volume="/global/cscratch1/sd/stephey/delta/delta:/opt/delta" /bin/bash
pytest /opt/delta/tests
```

0 comments on commit 3f3a62f

Please sign in to comment.