yurinnick / folding-at-home-docker

Unofficial Folding@Home Docker Image
https://hub.docker.com/r/yurinnick/folding-at-home
GNU General Public License v3.0
57 stars 30 forks source link

--power argument seems to be ignored #17

Open dkbnz opened 4 years ago

dkbnz commented 4 years ago

While trying to set the power level using the environment var POWER, It seems to be ignored.

My compose file:

version: "2.4"

networks:
  proxy:
    external: true

services:

  folding-at-home:
    image: yurinnick/folding-at-home
    container_name: folding-at-home
    networks:
      - proxy
    command: ["--allow=0/0", "--web-allow=0/0"] # Allow connections from non-localhost ip addresses
    volumes:
      - ~/homelab_data/folding:/opt/fahclient/work
    environment:
      - USER=plateofash
      - TEAM=0
      - ENABLE_GPU=false
      - ENABLE_SMP=true
      - POWER=light
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.folding-at-home.entrypoints=http"
      - "traefik.http.routers.folding-at-home.rule=Host(`folding.${DOMAIN}`)"
      - "traefik.http.services.folding-at-home.loadbalancer.server.port=7396"

However, after starting and analysing the logs, I see the power passed to FAHClient is "full"

05:01:54:       Args: --user=plateofash --team=0 --passkey= --gpu=false --smp=true
05:01:54:             --power=full --gui-enabled=false --allow=0/0 --web-allow=0/0

From within the container, the env variable is set.

folding@d40eac954e68:/opt/fahclient$ echo $POWER 
light

I've also tried with and without quotations.

If others are having this issue, the built in docker resource limitations work perfectly and is what I have resorted to.

wandhydrant commented 4 years ago

Very weird. The entrypoint.sh file is very simple: https://github.com/yurinnick/folding-at-home-docker/blob/master/entrypoint.sh If POWER is ignored, I'd imagine USER to be ignored, too, but yours is well present...

dkbnz commented 4 years ago

Yeap, I expected the same. I wonder if it's an issue with FAHClient

ghost commented 4 years ago

I had the issue as well at one point, but my compose file looked fine. I'm using Portainer and noticed that it doesn't always seem to "take" changes to environment variables. Completely removing the existing Container and running the Compose file from scratch seemed to resolve it.