1
0
Fork 0

Initial upload

This commit is contained in:
Nikolai Iurin 2020-03-05 02:46:24 -08:00
parent be47bcad80
commit d65fe537bb
4 changed files with 139 additions and 0 deletions

34
Dockerfile Normal file
View file

@ -0,0 +1,34 @@
FROM debian:stable-slim
ARG version="v7.5"
RUN useradd --system folding && \
mkdir -p /opt/fahclient && \
# download and untar
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
chown -R folding:folding /opt/fahclient && \
# cleanup
rm -rf /tmp/fahclient.tar.bz2 && \
apt-get purge -y wget bzip2 && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /opt/fahclient
ENV USER "Anonymous"
ENV TEAM "0"
ENV ENABLE_GPU "false"
ENV ENABLE_SMP "true"
USER folding
WORKDIR /opt/fahclient
EXPOSE 7396
EXPOSE 36330
ENTRYPOINT ["/opt/fahclient/entrypoint.sh"]

79
README.md Normal file
View file

@ -0,0 +1,79 @@
# Folding@Home Docker
Folding@home is a project focused on disease research. The problems were solving require so many computer calcul­ations and we need your help to find the cures!
## Usage
### docker
```
docker run \
--name folding-at-home \
-p 7396:7396 \
-p 36330:36330 \
-e USER=Anonymous \
-e TEAM=0 \
-e ENABLE_GPU=false \
-e ENABLE_SMP=true \
--restart unless-stopped \
yurinnick/folding-at-home
```
### docker-compose
```
---
version: "3"
services:
folding-at-home:
image: yurinnick/folding-at-home
container_name: folding-at-home
environment:
- USER=Anonymous
- TEAM=0
- ENABLE_GPU=false
- ENABLE_SMP=true
ports:
- 7396:7396
- 36330:36330
restart: unless-stopped
```
### Kubernetes
```
TDB
```
## Parameters
- USER - Folding@home username (default: Anonymous)
- TEAM - Foldinghome team number (default: 0)
- PASSKEY - [optional] Folding@home [passkey](https://apps.foldingathome.org/getpasskey)
- ENABLE_GPU - Enable GPU compute (default: false)
- ENABLE_SMP - Enable auto-configuration of SMP slots (default: true)
Additional configuration parameters can be passed as command line arguments. To get the full list of parameters run:
```
docker run yurinnick/folding-at-home:latest --help
```
## Web Interface
Web interface is locked to `localhost` by default, to enable remote access run:
```
docker run \
--name folding-at-home \
-p 7396:7396 \
-p 36330:36330 \
-e USER=Anonymous \
-e TEAM=0 \
-e ENABLE_GPU=false \
-e ENABLE_SMP=true \
--restart unless-stopped \
yurinnick/folding-at-home \
--allow 0/0 \
--web-allow 0/0
```

15
docker-compose.yaml Normal file
View file

@ -0,0 +1,15 @@
---
version: "3"
services:
folding-at-home:
image: yurinnick/folding-at-home
container_name: folding-at-home
environment:
- USER=Anonymous
- TEAM=0
- ENABLE_GPU=false
- ENABLE_SMP=true
ports:
- 7396:7396
- 36330:36330
restart: unless-stopped

11
entrypoint.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/bash
/opt/fahclient/FAHClient \
--user=${USER} \
--team=${TEAM} \
--passkey=${PASSKEY} \
--gpu=${ENABLE_GPU} \
--smp=${ENABLE_SMP} \
--power=full \
--gui-enabled=false \
${@}