1
0
Fork 0
folding-at-home-docker-gpu/Dockerfile

51 lines
1.4 KiB
Docker
Raw Permalink Normal View History

FROM nvidia/cuda:10.2-base-ubuntu18.04
2020-03-05 10:46:24 +00:00
ARG version="v7.5"
RUN apt-get update && apt-get install -y --no-install-recommends \
# Install PPA dependency
software-properties-common \
# Install Time Zone Database
tzdata && \
# Install folding@home client
useradd --system folding && \
2020-03-05 10:46:24 +00:00
mkdir -p /opt/fahclient && \
# download and untar
2020-03-05 10:46:24 +00:00
apt-get update -y && \
apt-get install -y wget bzip2 && \
wget https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/${version}/latest.tar.bz2 -O /tmp/fahclient.tar.bz2 && \
tar -xjf /tmp/fahclient.tar.bz2 -C /opt/fahclient --strip-components=1 && \
# fix permissions
2020-03-05 10:46:24 +00:00
chown -R folding:folding /opt/fahclient && \
# cleanup
2020-03-05 10:46:24 +00:00
rm -rf /tmp/fahclient.tar.bz2 && \
# Install Nvidia OpenCL
add-apt-repository -y ppa:graphics-drivers && \
apt-get update && apt-get install -y --install-recommends \
nvidia-opencl-dev && \
# Cleaning up
apt-get remove -y software-properties-common && \
apt-get autoremove -y && \
2020-03-05 10:46:24 +00:00
apt-get clean autoclean && \
rm -rf /var/lib/apt/lists/*
COPY --chown=folding:folding entrypoint.sh /opt/fahclient
RUN chmod +x /opt/fahclient/entrypoint.sh
2020-03-05 10:46:24 +00:00
ENV USER "Anonymous"
ENV TEAM "0"
ENV ENABLE_GPU "true"
2020-03-05 10:46:24 +00:00
ENV ENABLE_SMP "true"
ENV POWER "full"
2020-03-05 10:46:24 +00:00
USER folding
WORKDIR /opt/fahclient
EXPOSE 7396
EXPOSE 36330
ENTRYPOINT ["/opt/fahclient/entrypoint.sh"]