-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (41 loc) · 1.71 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
# ovishpc/ldms-ui
#
# The docker context is prepared by './docker-build.sh'.
FROM ubuntu:22.04
SHELL [ "/bin/bash", "-c" ]
# Get LDMS dependencies
RUN export DEBIAN_FRONTEND=noninteractive ; \
apt-get update -y ; \
apt-get install -y librdmacm1 libibverbs1 libpapi6.0 libpfm4 munge \
python3 python3-numpy python3-pandas \
uwsgi uwsgi-plugin-python3 \
python3-django python3-django-cors-headers \
libjansson4 \
; \
apt-get autoremove -y ; \
apt-get clean -y ;
# copy LDMS binaries
ADD --chown=root:root bin /opt/ovis/bin/
ADD --chown=root:root sbin /opt/ovis/sbin/
ADD --chown=root:root lib /opt/ovis/lib/
ADD --chown=root:root etc /opt/ovis/etc/
ADD --chown=root:root ui /opt/ovis/ui/
# setup LDMS env
RUN ln -s /opt/ovis/etc/profile.d/set-ovis-variables.sh /etc/profile.d/ ; \
ln -s /opt/ovis/etc/ld.so.conf.d/ovis-ld-so.conf /etc/ld.so.conf.d/z-ovis-ld-so.conf ; \
ldconfig ;
ENV PATH=/opt/ovis/bin:/opt/ovis/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PYTHONPATH=/opt/ovis/lib/python3.10/site-packages:/opt/ovis/lib/python3.10/dist-packages
ENV LDMSD_PLUGIN_LIBPATH=/opt/ovis/lib/ovis-ldms
ENV ZAP_LIBPATH=/opt/ovis/lib/ovis-ldms
RUN echo > /start-uwsgi-sosgui.sh -e "#!/bin/bash\n\
mkdir -p /var/log/sosgui\n\
cd /opt/ovis/ui\n\
OPTS=( \"\$@\" )\n\
[[ \" \${OPTS[*]} \" == *\\ --http-socket* ]] || OPTS+=( --http-socket=:80 )\n\
[[ \" \${OPTS[*]} \" == *\\ --plugins* ]] || OPTS+=( --plugins=python3 )\n\
[[ \" \${OPTS[*]} \" == *\\ --module* ]] || OPTS+=( --module=sosgui.wsgi )\n\
uwsgi \"\${OPTS[@]}\" 2>&1 | tee /var/log/uwsgi.log\n\
" ; \
chmod 755 /start-uwsgi-sosgui.sh
ENTRYPOINT [ "/start-uwsgi-sosgui.sh" ]