Skip to content

Commit

Permalink
debug docker res config-21
Browse files Browse the repository at this point in the history
  • Loading branch information
asm582 committed Dec 15, 2023
1 parent dd1c862 commit a991ddc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/mcad-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
steps:
- name: run docker resource config
run: |
sudo touch /etc/systemd/system/slice.conf
cat <<EOF > /etc/systemd/system/slice.conf
sudo touch $PWD/slice.conf
cat <<EOF > $PWD/slice.conf
[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 sed -i 's|{ "exec-opts": \["native.cgroupdriver=cgroupfs"\], "cgroup-parent": "/actions_job" }|'"$new_content"'|' /etc/docker/daemon.json
sudo systemctl start slice.conf
cat /etc/docker/daemon.json
sudo systemctl restart docker
sleep 10
Expand Down

0 comments on commit a991ddc

Please sign in to comment.