-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
35 lines (26 loc) · 1.28 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
# Build with "docker build --pull --no-cache -t docker.codingcafe.org/xkszltl/roaster/centos [email protected]:xkszltl/roaster.git"
FROM centos
ARG LABEL_BUILD_ID=Undefined
LABEL BUILD_ID=$LABEL_BUILD_ID
SHELL ["/bin/bash", "-c"]
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib64:/usr/local/nvidia/lib:${LD_LIBRARY_PATH}
ENV NVIDIA_VISIBLE_DEVICES all
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ "_$i" = '_systemd-tmpfiles-setup.service' ] || rm -f "$i"; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*; \
rm -f /etc/systemd/system/*.wants/*; \
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*; \
truncate -s0 ~/.bash_history
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]
# nvidia-docker
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib64:/usr/local/nvidia/lib:${LD_LIBRARY_PATH}
ENV NVIDIA_VISIBLE_DEVICES all
VOLUME ["/var/log"]
COPY [".", "/etc/roaster/scripts"]
RUN /etc/roaster/setup.sh