Skip to content

Commit

Permalink
more podman notes
Browse files Browse the repository at this point in the history
  • Loading branch information
moustakas committed Dec 17, 2024
1 parent 6b4e070 commit 5045c71
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
8 changes: 1 addition & 7 deletions docker/Containerfile-test
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# podman-hpc login docker.io
# podman-hpc build --tag desihub/fastspecfit-test --file ./Containerfile-test .
# podman-hpc migrate desihub/fastspecfit-test
# podman-hpc run --rm -it desihub/fastspecfit-test /bin/bash
# srun --ntasks=2 podman-hpc run --rm --mpi -it desihub/fastspecfit-test /usr/local/bin/test-mpi-fastspecfit --mp=4

FROM desihub/fastspecfit-base:1.0

WORKDIR /src
Expand All @@ -14,7 +8,7 @@ RUN for x in \
wheel \
setuptools \
pytest \
# numpy \
numpy \
numba \
ipython \
ipykernel \
Expand Down
23 changes: 15 additions & 8 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ podman-hpc push desihub/fastspecfit-base:1.0

Check the versions:
```
podman-hpc run --rm -it desihub/fastspecfit-base:1.0 mpirun --version
podman-hpc run --rm -it desihub/fastspecfit-base:1.0 python -m mpi4py --version
podman-hpc run --rm -it desihub/fastspecfit-base:1.0 python -m mpi4py --mpi-std-version
podman-hpc run --rm -it desihub/fastspecfit-base:1.0 python -m mpi4py --mpi-lib-version
podman-hpc run --rm desihub/fastspecfit-base:1.0 mpirun --version
podman-hpc run --rm desihub/fastspecfit-base:1.0 python -m mpi4py --version
podman-hpc run --rm desihub/fastspecfit-base:1.0 python -m mpi4py --mpi-std-version
podman-hpc run --rm desihub/fastspecfit-base:1.0 python -m mpi4py --mpi-lib-version
```

```
srun --ntasks=4 podman-hpc run --rm -it --mpi desihub/fastspecfit-base:1.0 python -m mpi4py.bench helloworld
srun --ntasks=4 podman-hpc run --rm --mpi desihub/fastspecfit-base:1.0 python -m mpi4py.bench helloworld
```


### Test scripts:
podman-hpc login docker.io
podman-hpc build --tag desihub/fastspecfit-test --file ./Containerfile-test .
podman-hpc migrate desihub/fastspecfit-test
srun --ntasks=2 podman-hpc run --rm --mpi desihub/fastspecfit-test /usr/local/bin/test-mpi-fastspecfit --mp=4


###

First, build the container:
Expand All @@ -38,9 +45,9 @@ podman-hpc migrate desihub/fastspecfit:3.1.1
podman-hpc push desihub/fastspecfit:3.1.1
```

podman-hpc run --userns keep-id --rm --volume=/dvs_ro/cfs/cdirs:/dvs_ro/cfs/cdirs --volume=/pscratch/sd/i/ioannis:/scratch -it fastspecfit:3.1.1 /bin/bash
podman-hpc run --userns keep-id --rm --volume=/dvs_ro/cfs/cdirs:/dvs_ro/cfs/cdirs --volume=/pscratch/sd/i/ioannis:/scratch fastspecfit:3.1.1 /bin/bash

podman-hpc run --userns keep-id --group-add keep-groups --rm --volume=/dvs_ro/cfs/cdirs:/dvs_ro/cfs/cdirs --volume=/global/cfs/cdirs:/global/cfs/cdirs --volume=/pscratch/sd/i/ioannis:/scratch --env NUMBA_CACHE_DIR=/scratch/numba_cache -it desihub/fastspecfit:3.1.1 /bin/bash
podman-hpc run --userns keep-id --group-add keep-groups --rm --volume=/dvs_ro/cfs/cdirs:/dvs_ro/cfs/cdirs --volume=/global/cfs/cdirs:/global/cfs/cdirs --volume=/pscratch/sd/i/ioannis:/scratch --env NUMBA_CACHE_DIR=/scratch/numba_cache desihub/fastspecfit:3.1.1 /bin/bash

List the available images:
```
Expand All @@ -56,7 +63,7 @@ podman-hpc pull desihub/fastspecfit:3.1.1

Enter the container:
```
podman-hpc run --rm -it fastspecfit:3.1.1 /bin/bash
podman-hpc run --rm fastspecfit:3.1.1 /bin/bash
```

To delete a container:
Expand Down

0 comments on commit 5045c71

Please sign in to comment.