forked from jumanjihouse/docker-opensm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (59 loc) · 2.51 KB
/
Copy pathDockerfile
File metadata and controls
68 lines (59 loc) · 2.51 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM rockylinux:9
ARG BUILD_DATE
ARG VCS_REF
ARG TARGETARCH
ARG VERSION=3.2.3
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 <tom@stackhpc.com>"
RUN set -eux; \
dnf install -y 'dnf-command(config-manager)'; \
case "${TARGETARCH}" in \
amd64) repo_arch=x86_64 ;; \
arm64) repo_arch=arm64-sbsa ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" >&2; exit 1 ;; \
esac; \
dnf config-manager --add-repo "https://linux.mellanox.com/public/repo/doca/${VERSION}/rhel9/${repo_arch}/"; \
rpm --import "https://linux.mellanox.com/public/repo/doca/${VERSION}/rhel9/${repo_arch}/RPM-GPG-KEY-doca"; \
dnf install -y doca-ofed; \
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"]