Skip to content

Commit

Permalink
debug docker res config-22
Browse files Browse the repository at this point in the history
  • Loading branch information
asm582 committed Dec 16, 2023
1 parent a991ddc commit 883e04a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mcad-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
steps:
- name: run docker resource config
run: |
sudo touch $PWD/slice.conf
cat <<EOF > $PWD/slice.conf
sudo touch /etc/systemd/system/docker_limit.slice
cat <<EOF > /etc/systemd/system/docker_limit.slice
[Unit]
Description=Slice that limits docker resources
Before=slices.target
[Slice]
CPUAccounting=true
CPUQuota=50%
EOF
sudo systemctl start $PWD/slice.conf
new_content='{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/slice.conf" }'
sudo systemctl start /etc/systemd/system/docker_limit.slice
new_content='{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/docker_limit.slice" }'
sudo sed -i 's|{ "exec-opts": \["native.cgroupdriver=cgroupfs"\], "cgroup-parent": "/actions_job" }|'"$new_content"'|' /etc/docker/daemon.json
cat /etc/docker/daemon.json
sudo systemctl restart docker
Expand Down

0 comments on commit 883e04a

Please sign in to comment.