-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gpu
60 lines (49 loc) · 1.87 KB
/
Dockerfile.gpu
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
# Use a base image
FROM ghcr.io/ecohealthalliance/slurm_reservoir:base
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV SLURM_VERSION=23.11.6
# Clean up package cache and remove temporary files
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy and make system tools installation script executable
COPY scripts/install_system_tools.sh /install_system_tools.sh
RUN chmod +x /install_system_tools.sh
RUN /install_system_tools.sh
#Install SSH server
RUN apt-get update && apt-get install -y openssh-server
# Define volumes
# Set environment variables for SLURM
ENV USE_SLURMDBD=true \
CLUSTER_NAME=snowflake \
CONTROL_MACHINE=controller \
SLURMCTLD_PORT=6817 \
SLURMD_PORT=6819 \
ACCOUNTING_STORAGE_HOST=localhost \
ACCOUNTING_STORAGE_PORT=3306 \
STORAGE_PASS=/var/run/munge/munge.socket.2 \
STORAGE_USER=slurm \
PARTITION_NAME=docker
# Copy necessary scripts and configuration files
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY /config/slurm.conf /etc/slurm/slurm.conf
COPY /config/slurmdbd.conf /etc/slurm/slurmdbd.conf
COPY /scripts/copy_secrets.sh /copy_secrets.sh
COPY /scripts/munge.sh /munge.sh
COPY /scripts/db_start.sh /db_start.sh
COPY /scripts/slurmctld.sh /slurmctld.sh
COPY /scripts/direc_perm.sh /direct_perm.sh
COPY /scripts/slurmdbd.sh /slurmdbd.sh
COPY /scripts/install_system_tools.sh /install_system_tools.sh
COPY /scripts/userconf.sh /userconf.sh
COPY /scripts/module_setup.sh /module.sh
COPY /config/ssh_config /etc/ssh/sshd_config
COPY /scripts/ansible_user.sh /ansible_user.sh
# Make scripts executable
RUN chmod +x /docker-entrypoint.sh
RUN chmod +x /userconf.sh
RUN chmod +x /install_system_tools.sh
RUN chmod +x /ansible_user.sh
# Define the entry point for the container
ENTRYPOINT ["/usr/bin/tini", "--", "/docker-entrypoint.sh", "/init","/opt/nvidia/nvidia_…"]
# Expose necessary ports
EXPOSE 22 6817 6818 6819 3306 8787