Super Micro fan control for Linux (home) servers.
10K+
This page describes the most important docker-specific information for smfc. Please visit the GitHub repository of smfc for more details or for reporting issues.
⚠️ Runtime configuration changed: the host mount was narrowed from
/run:/run:roto/run/udev:/run/udev:ro(see issue #107). If you are upgrading an existing setup, update thevolumessection of yourdocker runcommand / compose file accordingly. The old wide/run:/run:romount prevents the GPU images from starting under the NVIDIA Container Toolkit (mkdirat run/nvidia-ctk-hook: read-only file system).
There are three images created for smfc:
| Image type | Tags | Base image | Pros | Cons |
|---|---|---|---|---|
| Standard | 6.4.2 / latest | Alpine Linux 3.24.1 | Small image size | GPU/NPU fan controllers not supported |
| NVIDIA GPU-enabled | 6.4.2-nvidia/ latest-nvidia | Debian 13.6 (slim) | GPU fan controller supported via nvidia-smi | Larger image size; requires NVIDIA Container Toolkit on host |
| AMD GPU-enabled | 6.4.2-amd / latest-amd | Ubuntu 24.04.4 (ROCm 7.8.0) | GPU fan controller supported via rocm-smi | Larger image size; requires amdgpu kernel driver on host |
Docker image tags changed for GPU-enabled images with the newly implemented AMD GPU support in
smfc v5.4.0!
⚠️ The NPU fan controller is currently not supported in any of the docker images.
npu-smiis part of the Ascend driver installed on the host and is not present in the images, so an enabled[NPU]section stops the container at start-up withERROR: npu-smi command cannot be found!(exit code 7, runtime dependency error). Runsmfcas asystemdservice on the host if you need the NPU fan controller.
Generic notes for the docker images:
smfc is executed here as a simple foreground process (not as a systemd service).ipmitool and smartctl require read-only access to host's /dev/ and /run/udev folders and admin privilege./sys filesystem can be accessed in the container, but the proper kernel module (i.e. coretemp, k10temp, and drivetemp) needs to be loaded on host side. The same applies to the PCI fan controller: the driver of the card (e.g. atlantic) must be loaded on the host, and the card's HWMON files are then visible in the container.journald daemon (as it is configured in Usage chapter), but feel free to configure other logging drivers.[IPMI] remote_parameters=-U USERNAME -P PASSWORD -H HOST parameter in the configuration file) if IPMI interface is not accessible from docker container.This image contains the following components:
Alpine Linux 3.24.1Python 3.14.7-r1ipmitool 1.8.19-r1smartmontools 7.5-r0The service can be started:
docker run \
-d \
--rm \
--log-driver=journald \
--privileged=true \
--name "smfc" \
-v /dev:/dev:ro \
-v /run/udev:/run/udev:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
-e SMFC_ARGS="-l 3" \
petersulyok/smfc:latest
(sample script can be found here), and can be terminated:
docker stop smfc
docker-compose requires this file:
services:
smfc:
image: petersulyok/smfc:latest
container_name: smfc
logging:
driver: journald
privileged: true
environment:
- SMFC_ARGS=-l 3
volumes:
- /dev:/dev:ro
- /run/udev:/run/udev:ro
- /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
(sample yaml file can be found here), and docker image can be started/stopped this way:
docker compose up -d
docker compose down
This image contains the following components:
Debian Linux 13.6 (slim)Python 3.13.5ipmitool 1.8.19-9smartmontools 7.4-3Install the NVIDIA driver and the NVIDIA Container Toolkit on your host as it is described here. After a successful installation, execute the following commands:
nvidia-ctk runtime configure --runtime=docker
systemctl restart docker
Restart is needed because NVIDIA Container Toolkit modified the /etc/docker/daemon.json file, and added the nvidia runtime parameters.
The service can be started:
docker run \
-d \
--rm \
--runtime=nvidia \
--gpus all \
--log-driver=journald \
--privileged=true \
--name "smfc" \
-v /dev:/dev:ro \
-v /run/udev:/run/udev:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
-e SMFC_ARGS="-l 3" \
petersulyok/smfc:latest-nvidia
(sample script can be found here), and can be terminated:
docker stop smfc
docker-compose requires this file:
services:
smfc:
image: petersulyok/smfc:latest-nvidia
container_name: smfc
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
logging:
driver: journald
privileged: true
environment:
- SMFC_ARGS=-l 3
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
volumes:
- /dev:/dev:ro
- /run/udev:/run/udev:ro
- /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
(sample yaml file can be found here), and docker image can be started/stopped this way:
docker compose -f docker-compose-nvidia.yaml up -d
docker compose -f docker-compose-nvidia.yaml down
This image contains the following components:
Ubuntu 24.04.4Python 3.12.3ipmitool 1.8.19smartmontools 7.4rocm-smi 7.8.0 (rocm-smi-lib package from the 7.2.4 repository of the official AMD package repository)Note: from
smfc v6.0.1this image is built on the standardUbuntubase image, and only therocm-smi-libpackage is installed from the AMD package repository instead of using therocm/dev-ubuntubase image (which contains the complete ROCm SDK). This reduces the image size from 4 GB to 233 MB. Therocm-smicommand is installed in/opt/rocm/bin, but it is also linked to/usr/bin/rocm-smi, which is the default value of the[GPU] rocm_smi_path=configuration parameter, so no extra configuration is needed.
rocm-smi is installed inside the Docker image — it does not need to be installed on the host.
The host only needs the amdgpu kernel driver loaded, which exposes /dev/kfd and /dev/dri. This driver has been part of the Linux kernel since 4.5, so it is already present on most modern systems. You can verify it is loaded with:
lsmod | grep amdgpu
The service can be started:
docker run \
-d \
--rm \
--device /dev/kfd \
--device /dev/dri \
--group-add video \
--group-add render \
--security-opt seccomp=unconfined \
--log-driver=journald \
--privileged=true \
--name "smfc" \
-v /dev:/dev:ro \
-v /run/udev:/run/udev:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
-e SMFC_ARGS="-l 3" \
petersulyok/smfc:latest-amd
(sample script can be found here), and can be terminated:
docker stop smfc
docker-compose requires this file:
services:
smfc:
image: petersulyok/smfc:latest-amd
container_name: smfc
devices:
- /dev/kfd
- /dev/dri
group_add:
- video
- render
security_opt:
- seccomp:unconfined
logging:
driver: journald
privileged: true
environment:
- SMFC_ARGS=-l 3
volumes:
- /dev:/dev:ro
- /run/udev:/run/udev:ro
- /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
(sample yaml file can be found here), and docker image can be started/stopped this way:
docker compose -f docker-compose-amd.yaml up -d
docker compose -f docker-compose-amd.yaml down
smfcUse the following parameters to configure smfc:
| Parameter | type | function |
|---|---|---|
SMFC_ARGS | environment variable | command-line arguments for smfc (only for -o, -l parameters!) |
smfc.conf | volume (ro) | configuration file for smfc, mapped from host side |
Stopping the container (docker stop, docker compose down, or a container restart) sends SIGTERM to smfc,
which applies the configured [Ipmi] exit_level= (100% by default) to all configured IPMI zones before it exits,
so the fans are never left unregulated. Set exit_level=-1 in your configuration file if smfc should not change
the fan levels at exit. Note that a docker kill sends SIGKILL, where no in-process handler can run.
All three images contain the smfc-client command (see README chapter 14.),
which displays a read-only snapshot of the fan controllers, fan levels, IPMI zones and standby state. The easiest way
to use it is executing the command in the running container:
docker exec smfc smfc-client
docker exec smfc smfc-client --verbose
Notes:
If the HTTP exporter is enabled in the configuration file ([Exporter] enabled=1) then smfc-client reads the
live snapshot of the running smfc service. Otherwise it falls back to standalone mode and reads the sensors
itself (i.e. it executes ipmitool and smartctl again).
The command runs as root in the container, so the --sudo parameter is not needed.
smfc-client can also be started in a separate container with --entrypoint smfc-client. In this case only
standalone mode is available (the exporter of the service is not reachable from another container, unless
--network container:smfc is specified), and the container needs exactly the same command-line parameters and
volumes as the docker run command of the given image (described earlier on this page), because
smfc-client reads the very same sensors as the service.
In case of remote IPMI access ([Ipmi] remote_parameters=) the --privileged parameter and the /dev volume
can be omitted, because ipmitool uses the network instead of the local /dev/ipmi0 device:
docker run --rm \
-v /run/udev:/run/udev:ro \
-v /etc/smfc/smfc.conf:/etc/smfc/smfc.conf:ro \
--entrypoint smfc-client \
petersulyok/smfc:latest
See CHANGELOG.md for more details:
Content type
Image
Digest
sha256:b19c970f3…
Size
22.2 MB
Last updated
28 days ago
docker pull petersulyok/smfc