-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathslurm-client
60 lines (41 loc) · 1.55 KB
/
slurm-client
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
FROM ubuntu:22.04 as slurm_build
CMD ["/bin/bash"]
ENV DEBIAN_FRONTEND=noninteractive
ARG VERSION=${VERSION}
ENV VERSION=${VERSION}
# Install all base dependencies
RUN apt-get update && apt install sudo git gcc make ruby ruby-dev python3 bzip2 \
libpam0g-dev mariadb-client libmysqlclient-dev wget vim curl libtool -y
# Install gem needed for dpkg
RUN gem install fpm
# Install munge
RUN apt-get install libmunge-dev libmunge2 munge -y
# Install hdf5
RUN apt-get install libhdf5-serial-dev hdf5-tools -y
RUN mkdir /storage
WORKDIR /storage
RUN wget https://download.schedmd.com/slurm/slurm-$VERSION.tar.bz2 && \
tar xvf slurm-$VERSION.tar.bz2
WORKDIR /storage/slurm-$VERSION
RUN ./configure --prefix=/storage/slurm-build --sysconfdir=/etc/slurm --enable-pam \
--with-pam_dir=/lib/x86_64-linux-gnu/security/ --without-shared-libslurm
RUN make
RUN make contrib
RUN make install
WORKDIR /storage
RUN fpm -s dir -t deb -v 1.0 -n slurm-$VERSION --prefix=/usr -C /storage/slurm-build .
FROM ubuntu:22.04
ARG VERSION=${VERSION}
ENV VERSION=${VERSION}
# extract and install slurm
RUN mkdir /storage
WORKDIR /storage
COPY --from=slurm_build /storage/slurm-build /storage/slurm-build
COPY --from=slurm_build /storage/slurm-${VERSION}_1.0_amd64.deb ./
RUN dpkg -i slurm-${VERSION}_1.0_amd64.deb && rm -rf slurm-${VERSION}_1.0_amd64.deb
## Install munge
RUN apt-get update && apt-get install libmunge-dev libmunge2 munge -y
COPY src/scripts/start-slurm-client.sh /storage/start-slurm-client.sh
WORKDIR /storage
RUN useradd slurm
ENTRYPOINT sh start-slurm-client.sh