Skip to content

Commit c5d8dfa

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 0c91fae + 49cd96d commit c5d8dfa

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Free up disk space"
2+
description: "Removes non-essential tools, libraries and cached files from GitHub action runner node"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: "Remove non-essential tools and libraries"
8+
shell: bash
9+
run: |
10+
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
11+
echo "Disk usage before cleanup:"
12+
df -h
13+
echo "Removing non-essential tools and libraries ..."
14+
sudo rm -rf /opt/ghc
15+
sudo rm -rf /usr/local/.ghcup
16+
sudo rm -rf /usr/share/dotnet
17+
# sudo rm -rf /usr/local/share/boost
18+
echo "Deleting libraries for Android (12G), CodeQL (5.3G), PowerShell (1.3G), Swift (1.7G) ..."
19+
sudo rm -rf /usr/local/lib/android
20+
sudo rm -rf "${AGENT_TOOLSDIRECTORY}/CodeQL"
21+
sudo rm -rf /usr/local/share/powershell
22+
sudo rm -rf /usr/share/swift
23+
# ref: https://github.com/jlumbroso/free-disk-space/blob/main/action.yml
24+
echo "Deleting some larger apt packages:"
25+
sudo apt-get remove -y '^aspnetcore-.*' || echo "::warning::The command [sudo apt-get remove -y '^aspnetcore-.*'] failed to complete successfully. Proceeding..."
26+
sudo apt-get remove -y '^dotnet-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^dotnet-.*' --fix-missing] failed to complete successfully. Proceeding..."
27+
sudo apt-get remove -y '^llvm-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^llvm-.*' --fix-missing] failed to complete successfully. Proceeding..."
28+
sudo apt-get remove -y 'php.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y 'php.*' --fix-missing] failed to complete successfully. Proceeding..."
29+
sudo apt-get remove -y '^mongodb-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mongodb-.*' --fix-missing] failed to complete successfully. Proceeding..."
30+
sudo apt-get remove -y '^mysql-.*' --fix-missing || echo "::warning::The command [sudo apt-get remove -y '^mysql-.*' --fix-missing] failed to complete successfully. Proceeding..."
31+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing || echo "::warning::The command [sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing] failed to complete successfully. Proceeding..."
32+
sudo apt-get remove -y google-cloud-sdk --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-sdk --fix-missing] failed to complete successfully. Proceeding..."
33+
sudo apt-get remove -y google-cloud-cli --fix-missing || echo "::debug::The command [sudo apt-get remove -y google-cloud-cli --fix-missing] failed to complete successfully. Proceeding..."
34+
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed to complete successfully. Proceeding..."
35+
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed to complete successfully. Proceeding..."
36+
echo "Disk usage after cleanup:"
37+
df -h
38+
39+
- name: "Prune docker images"
40+
shell: bash
41+
run: |
42+
echo "Pruning docker images ..."
43+
docker image prune -a -f
44+
docker system df
45+
echo "Disk usage after pruning docker images:"
46+
df -h

.github/workflows/image.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Free disk space
14-
run: |
15-
sudo swapoff -a
16-
sudo rm -f /swapfile
17-
sudo apt clean
18-
if [ "$(docker image ls -q)" ]; then docker rmi $(docker image ls -aq); fi
19-
df -h
13+
- name: "Free up disk space"
14+
uses: ./.github/actions/free-up-disk-space
2015
- name: Build image
2116
run: |
2217
docker build -t fms-hf-tuning:dev . -f build/Dockerfile

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies = [
3737
"trl>=0.13,<0.15",
3838
"peft>=0.8.0,<0.14",
3939
"protobuf>=5.28.0,<6.0.0",
40-
"datasets>=2.15.0,<3.0",
40+
"datasets>=2.15.0,<4.0",
4141
"simpleeval>=0.9.13,<2.0",
4242
]
4343

0 commit comments

Comments
 (0)