Skip to content

Commit 73b18c7

Browse files
Merge pull request #170 from 0xrushi/fix/version
fix: Enhance Docker versioning in workflow
2 parents 73e446a + 4bd4906 commit 73b18c7

4 files changed

Lines changed: 34 additions & 5 deletions

File tree

‎.github/workflows/advanced-docker-compose-build.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,24 @@ jobs:
106106
echo ".env not found; continuing"
107107
fi
108108
109+
- name: Free Disk Space
110+
run: |
111+
echo "Freeing disk space..."
112+
df -h
113+
sudo rm -rf /usr/share/dotnet
114+
sudo rm -rf /usr/local/lib/android
115+
sudo rm -rf /opt/ghc
116+
sudo rm -rf /usr/share/swift
117+
docker system prune -a -f
118+
df -h
119+
120+
- name: Initialize OpenMemory cache
121+
run: |
122+
echo "Initializing OpenMemory cache..."
123+
cd ../../extras/openmemory-mcp
124+
chmod +x init-cache.sh
125+
./init-cache.sh
126+
109127
- name: Determine version
110128
id: version
111129
run: |
@@ -116,6 +134,7 @@ jobs:
116134
else
117135
VERSION="sha-${GITHUB_SHA::7}"
118136
fi
137+
119138
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
120139
121140
- name: Build, tag, and push services sequentially with version
@@ -177,6 +196,9 @@ jobs:
177196
docker image rm -f "$target_image" || true
178197
docker image rm -f "$latest_image" || true
179198
echo "::endgroup::"
199+
200+
# Aggressive cleanup to save space
201+
docker system prune -af || true
180202
done
181203
182204
# Build and push parakeet-asr with CUDA variants (cu121, cu126, cu128)
@@ -205,6 +227,9 @@ jobs:
205227
docker image rm -f "$target_image" || true
206228
docker image rm -f "$latest_image" || true
207229
fi
230+
231+
# Aggressive cleanup to save space
232+
docker system prune -af || true
208233
done
209234
cd - > /dev/null
210235
echo "::endgroup::"
@@ -237,6 +262,9 @@ jobs:
237262
docker image rm -f "$target_image" || true
238263
docker image rm -f "$latest_image" || true
239264
fi
265+
266+
# Aggressive cleanup to save space
267+
docker system prune -af || true
240268
done
241269
cd - > /dev/null
242270
echo "::endgroup::"

‎extras/asr-services/Dockerfile_Moonshine‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1212

1313
# Dependency manifest first for cache‑friendly installs
1414
COPY pyproject.toml uv.lock ./
15-
RUN --mount=type=cache,target=/root/.cache/uv \
16-
uv sync --no-install-project --compile-bytecode --group moonshine
15+
RUN uv sync --no-install-project --compile-bytecode --group moonshine && \
16+
uv cache clean
1717

1818
# Add source and install project itself
1919
COPY . .

‎extras/asr-services/Dockerfile_Parakeet‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616

1717
# Dependency manifest first for cache‑friendly installs
1818
COPY pyproject.toml uv.lock ./
19-
RUN --mount=type=cache,target=/root/.cache/uv \
20-
uv sync --no-install-project --group parakeet --extra ${CUDA_VERSION}
19+
RUN uv sync --no-install-project --group parakeet --extra ${CUDA_VERSION} && \
20+
uv cache clean
2121

2222
# Should prepare the .venv for use :)
2323

‎extras/speaker-recognition/Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ RUN mkdir -p src/simple_speaker_recognition
2828
COPY src/simple_speaker_recognition/__init__.py src/simple_speaker_recognition/
2929

3030
# Install dependencies and package
31-
RUN uv sync --no-dev --extra ${PYTORCH_CUDA_VERSION}
31+
RUN uv sync --no-dev --extra ${PYTORCH_CUDA_VERSION} && \
32+
uv cache clean
3233

3334
# Create directories
3435
RUN mkdir -p /app/audio_chunks /app/debug /app/data /models

0 commit comments

Comments
 (0)