-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_container
More file actions
executable file
·38 lines (37 loc) · 1.29 KB
/
run_container
File metadata and controls
executable file
·38 lines (37 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# ---- Holoscan pipeline container launcher ----
#
# The pixi environment is baked into /pixi_env/ at build time.
# We do NOT mount ./podman_dir:/podman_dir — that would overwrite
# the pre-installed .pixi/ and force pixi to re-resolve from the
# internet, breaking offline machines (axinite, amazonite, NSLS-II).
#
# Source code (Holoptycho, nsls2ptycho) is mounted read-only via
# the /ptycho_gui_holoscan bind-mount.
#
# EDIT /path/to/models below before running (directory with .engine files).
if [ $# == 0 ]; then
ARG="shell"
else
ARG="$*"
fi
podman run --rm --net host -it \
--shm-size=32g \
-v ../:/ptycho_gui_holoscan \
-v "$HOME/.Xauthority:/root/.Xauthority:rw" \
-v /nsls2/data/hxn/legacy:/nsls2/data2/hxn/legacy \
-v /nsls2/data/hxn/legacy:/nsls2/data/hxn/legacy \
-v /nsls2/data/hxn/legacy:/data \
-v /nsls2/data/hxn/legacy/home/xf03id/src/hxntools:/hxntools \
-v $HOME/.ptycho_gui/root_home:/root \
-v /path/to/models:/models \
-w /pixi_env \
-e DISPLAY="$DISPLAY" \
-e PYTHONPATH=/ptycho_gui_holoscan/src:/ptycho_gui_holoscan/holoscan-framework:/hxntools/src \
-e OMPI_ALLOW_RUN_AS_ROOT=1 \
-e OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
-e OMPI_COMM_WORLD_LOCAL_RANK=0 \
-e OMPI_COMM_WORLD_LOCAL_SIZE=1 \
-e HOLOSCAN_ENABLE_PROFILE=1 \
--device nvidia.com/gpu=all \
hxn-ptycho-holoscan pixi $ARG