Skip to content

Commit 84f5cc4

Browse files
committed
Reduce bloat in ROCm Dockerfile
1 parent 812a72d commit 84f5cc4

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Create Release and Publish Docker Images
33
on:
44
push:
55
branches:
6-
- master
76
- release # Trigger when commits are pushed to the release branch (e.g., after merging master)
87
paths-ignore:
98
- '**.md'

docker/rocm/Dockerfile

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ RUN apt-get update && apt upgrade -y && apt-get install -y --no-install-recommen
1818
&& apt-get clean \
1919
&& rm -rf /var/lib/apt/lists/* \
2020
&& mkdir -p /usr/share/espeak-ng-data \
21-
&& ln -s /usr/lib/*/espeak-ng-data/* /usr/share/espeak-ng-data/
21+
&& ln -s /usr/lib/*/espeak-ng-data/* /usr/share/espeak-ng-data/ \
2222

23-
RUN mkdir -p /app/api/src/models/v1_0
24-
WORKDIR /app
25-
26-
# Install UV using the installer script
27-
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
28-
mv /root/.local/bin/uv /usr/local/bin/ && \
29-
mv /root/.local/bin/uvx /usr/local/bin/
23+
# Install UV using the installer script
24+
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
25+
&& mv /root/.local/bin/uv /usr/local/bin/ \
26+
&& mv /root/.local/bin/uvx /usr/local/bin/ \
3027

31-
# Create non-root user and set up directories and permissions
32-
RUN useradd -m -u 1001 appuser && \
33-
mkdir -p /app/api/src/models/v1_0 && \
34-
chown -R appuser:appuser /app
28+
# Create non-root user and set up directories and permissions
29+
&& useradd -m -u 1001 appuser \
30+
&& mkdir -p /app/api/src/models/v1_0 \
31+
&& chown -R appuser:appuser /app \
32+
# Models folder
33+
&& mkdir -p /app/api/src/models/v1_0
34+
WORKDIR /app
3535

3636
USER appuser
3737
WORKDIR /app
@@ -59,14 +59,9 @@ ENV PYTHONUNBUFFERED=1 \
5959
PYTHONPATH=/app:/app/api \
6060
PATH="/app/.venv/bin:$PATH" \
6161
UV_LINK_MODE=copy \
62-
USE_GPU=true
63-
64-
ENV DOWNLOAD_MODEL=true
65-
# Download model if enabled
66-
RUN if [ "$DOWNLOAD_MODEL" = "true" ]; then \
67-
python download_model.py --output api/src/models/v1_0; \
68-
fi
62+
USE_GPU=true \
63+
DOWNLOAD_MODEL=true \
64+
DEVICE="gpu"
6965

70-
ENV DEVICE="gpu"
7166
# Run FastAPI server through entrypoint.sh
7267
CMD ["./entrypoint.sh"]

0 commit comments

Comments
 (0)