-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-GPU
57 lines (43 loc) · 1.68 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
FROM ubuntu:22.04 as base
ENV DEBIAN_FRONTEND=noninteractive \
TINI_VERSION=v0.19.0
ARG FAH_MINOR=21
ARG FAH_MAJOR=7.6
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
curl \
gnupg \
bzip2 \
ca-certificates && \
curl --insecure https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v${FAH_MAJOR}/fahclient_${FAH_MAJOR}.${FAH_MINOR}_amd64.deb > /tmp/fah.deb &&\
mkdir -p /etc/fahclient/ &&\
touch /etc/fahclient/config.xml &&\
dpkg -i --force-depends /tmp/fah.deb &&\
chmod +x /tini
FROM nvidia/opencl:runtime-ubuntu18.04
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,graphics,utility"
ENV NVIDIA_VISIBLE_DEVICES="all"
COPY --from=base /tini /bin/tini
COPY --from=base /usr/bin/FAH* /usr/bin/
WORKDIR /app
# Install opencl
RUN mkdir -p /usr/share/doc/fahclient/ \
&& touch /usr/share/doc/fahclient/sample-config.xml \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
ocl-icd-opencl-dev \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/ /var/lib/dpkg/ /var/lib/cache/ /var/lib/log/ \
&& groupadd -r fah \
&& useradd -r -g fah fah \
&& chown -R fah /app
EXPOSE 7396 7396
USER fah
ENTRYPOINT ["/bin/tini", "--", "/usr/bin/FAHClient", "--web-allow=0/0:7396", "--allow=0/0:7396", "--smp=true"]
CMD ["--user=Anonymous", "--team=240110", "--power=full", "--gpu-usage=100", "--cpu-usage=100"]