forked from jumanjihouse/docker-opensm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (53 loc) · 2.39 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM rockylinux:9
ARG BUILD_DATE
ARG VCS_REF
ARG REPO=http://linux.mellanox.com/public/repo/mlnx_ofed/latest-23.10/rhel9.4/mellanox_mlnx_ofed.repo
LABEL \
org.label-schema.name="jumanjiman/opensm" \
org.label-schema.description="Infiniband subnet manager based on NVIDIA OFED" \
org.label-schema.url="https://github.com/stackhpc/docker-opensm" \
org.label-schema.vcs-url="https://github.com/stackhpc/docker-opensm.git" \
org.label-schema.vcs-type="Git" \
org.label-schema.license="GPLv3" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.original-repo-url="https://github.com/jumanjihouse/docker-opensm" \
org.label-schema.modified-by="Tom Clark <[email protected]>"
RUN dnf install -y 'dnf-command(config-manager)' \
&& dnf config-manager --add-repo \
http://linux.mellanox.com/public/repo/mlnx_ofed/latest-23.10/rhel9.4/mellanox_mlnx_ofed.repo \
&& rpm --import http://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox \
&& dnf group install -y "Infiniband Support" \
&& dnf clean all \
&& rm -rf /var/cache/dnf
# The following environment variables control opensm behavior:
#
# OSM_TMP_DIR: controls the directory in which the temporary files
# generated by opensm are created. These files are: opensm-subnet.lst,
# opensm.fdbs, and opensm.mcfdbs. By default, this directory is /var/log.
#
# OSM_CACHE_DIR: opensm stores certain data to the disk such that
# subsequent runs are consistent. The default directory used is
# /var/cache/opensm. The following files are included in it:
#
# guid2lid - stores the LID range assigned to each GUID
# guid2mkey - stores the MKey previously assiged to each GUID
# neighbors - stores a map of the GUIDs at either end of each link
# in the fabric
#
ENV OSM_LOG_DIR=/var/log/ \
OSM_CACHE_DIR=/var/cache/opensm/
# Allow to run container read-only and avoid this message:
# osm_dump_qmap_to_file: cannot create file '/var/log//opensm-subnet.lst': Read-only file system
VOLUME $OSM_LOG_DIR
# Replace this with --tmpfs option in docker 1.10 or higher.
VOLUME $OSM_CACHE_DIR
COPY start.sh /
ENTRYPOINT ["/start.sh"]
# Our default runtime options.
# '-p 15' gives openSM the highest priority
# 0x07 is the sum of:
# 0x01 - ERROR (error messages)
# 0x02 - INFO (basic messages, low volume)
# 0x04 - VERBOSE (interesting stuff, moderate volume)
CMD ["-p", "15", "-D", "0x07"]