Skip to content

Commit 1dde337

Browse files
committed
Fix GHCR GPU publish workflow and Docker entrypoint
1 parent c2d4e86 commit 1dde337

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

.github/workflows/publish-gpu.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

24+
- name: Free disk space (runner)
25+
run: |
26+
set -eux
27+
df -h
28+
29+
# Remove big preinstalled toolchains from GitHub-hosted runners
30+
sudo rm -rf /usr/share/dotnet || true
31+
sudo rm -rf /usr/local/lib/android || true
32+
sudo rm -rf /opt/ghc || true
33+
sudo rm -rf /usr/local/share/boost || true
34+
sudo rm -rf /usr/local/share/powershell || true
35+
sudo rm -rf /usr/share/swift || true
36+
37+
# Remove apt lists and any dangling docker data from previous jobs
38+
sudo apt-get clean || true
39+
sudo rm -rf /var/lib/apt/lists/* || true
40+
41+
# If docker is already present, prune aggressively
42+
docker system prune -af || true
43+
44+
df -h
45+
2446
- name: Set up Docker Buildx
2547
uses: docker/setup-buildx-action@v3
2648

docker/Dockerfile.gpu

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,15 @@ ENV UV_LINK_MODE=copy
5353
RUN python3 -m pip install --no-cache-dir -U pip setuptools wheel \
5454
&& python3 -m pip install --no-cache-dir uv
5555

56-
# Install Python deps from requirements
57-
RUN uv pip install --system -r /app/requirements.txt
56+
# Install Python deps from requirements (reduce build-time disk usage)
57+
# - Cache mount prevents cache from being committed into the image layer
58+
# - Explicit cleanup reduces transient disk pressure and final image size
59+
ENV UV_CACHE_DIR=/root/.cache/uv
60+
61+
RUN --mount=type=cache,target=/root/.cache/uv \
62+
uv pip install --system --no-cache-dir -r /app/requirements.txt && \
63+
rm -rf /root/.cache/uv
64+
5865

5966
# Required explicit installs (kept per your requirement)
6067
RUN uv pip install --system \

0 commit comments

Comments
 (0)