test(fah): try and fail to run folding at home as docker container

This commit is contained in:
Michele Cereda
2024-03-30 23:26:13 +01:00
parent 15c1df44e5
commit 72f11e280e
7 changed files with 102 additions and 1 deletions

1
.gitignore vendored
View File

@@ -7,7 +7,6 @@
/.lefthook-local.yml
/node_modules/
/package.json
/package-lock.json
.venv/

View File

@@ -25,6 +25,13 @@
],
"url": "https://json.schemastore.org/pre-commit-config.json"
},
{
"fileMatch": [
"docker-compose.yaml",
"docker-compose.yml"
],
"url": "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"
},
{
"fileMatch": [
"package.json"

View File

@@ -2,3 +2,6 @@ create-venv: override python_version ?= 3.12
create-venv:
python${python_version} -m 'venv' '.venv'
source '.venv/bin/activate' && pip install -r 'requirements.txt'
setup-for-hooks:
npm install --save-dev '@commitlint/cli' '@commitlint/config-conventional'

View File

@@ -0,0 +1,19 @@
# Folding at home
```sh
CURRENT_UID=$(id -u):$(id -g) docker-compose up
```
does not work. the container fails after reading the GPU list. Maybe mine is not there?
## Sources
- [Official Folding@home Containers]
- [Folding@home GPU Container]
- [Folding@home GPU Container readme]
- [fah-rocm - Folding@home GPU Container for AMD ROCm stack]
[Folding@home GPU Container readme]: https://github.com/FoldingAtHome/containers/blob/master/fah-gpu/README.md
[fah-rocm - Folding@home GPU Container for AMD ROCm stack]: https://github.com/FoldingAtHome/containers/tree/master/fah-gpu-amd
[Official Folding@home Containers]: https://github.com/foldingathome/containers/
[Folding@home GPU Container]: https://hub.docker.com/r/foldingathome/fah-gpu

View File

@@ -0,0 +1,37 @@
<config>
<!-- Client Control
Don't fold anonymously, provide user info. -->
<fold-anon v='false' />
<!-- Set with your user, passkey, team-->
<user value="CHANGEME" />
<passkey value="CHANGEME" />
<team value="0" />
<!-- Slot Control
Options: light, medium or full
Watch out for high load -->
<power value="light" />
<exit-when-done v='true' />
<idle v='true' /> <!-- Only run slot when idle. -->
<!-- Folding Slot Configuration -->
<gpu v='true' /> <!-- If true, attempt to autoconfigure GPUs -->
<!--slot id='0' type='GPU' /-->
<!--slot id='0' type='CPU'/-->
<!--cpus v='1'--> <!-- How many CPUs a slot should use. <= 0 will use all the CPUs detected in the
system. -->
<!-- Grant Remote Web Access
access web UI at 192.168.1.63:7396 -->
<allow>127.0.0.1 192.168.1.63</allow>
<web-allow>127.0.0.1 192.168.54.0</web-allow>
<!-- Disable unwanted services -->
<!--web-enable v='false'/-->
<disable-viz v='true' />
<gui-enabled v='false' />
</config>
<!-- vim: set sw=2 ts=2: -->

View File

@@ -0,0 +1,30 @@
---
# docker run --rm -it \
# --device=/dev/kfd --device=/dev/dri \
# --security-opt seccomp=unconfined --group-add video \
# --name fah0 --user (id -u):(id -g) \
# --volume $PWD/data:/fah \
# foldingathome/fah-gpu-amd:latest --verbose
version: '2.2'
services:
fah-client:
#image: foldingathome/fah-gpu-amd:7.6.21 # apparently there is no versioned image
image: foldingathome/fah-gpu-amd:latest
container_name: fah-client
restart: unless-stopped
# network_mode: host
# pid: host
mem_swappiness: 1
devices:
- /dev/dri:/dev/dri
- /dev/kfd:/dev/kfd
group_add:
- video
user: ${CURRENT_UID}
volumes:
- ${PWD}/data:/fah
ports:
- "7396:7396"
security_opt:
- seccomp:unconfined

6
package.json Normal file
View File

@@ -0,0 +1,6 @@
{
"devDependencies": {
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0"
}
}