Skip to content

Commit 966580d

Browse files
authored
Switch Dockerfile to use uv for dependency installation (#14)
2 parents e98d836 + d755db9 commit 966580d

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.github/workflows/release-docker.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
IMAGE_NAME: docker.io/zenmldocker/mcp-zenml
99

1010
permissions:
11-
contents: read
11+
contents: write
1212

1313
jobs:
1414
docker:
@@ -53,4 +53,11 @@ jobs:
5353
tags: ${{ steps.meta.outputs.tags }}
5454
labels: ${{ steps.meta.outputs.labels }}
5555
cache-from: type=gha
56-
cache-to: type=gha,mode=max
56+
cache-to: type=gha,mode=max
57+
58+
- name: Create GitHub Release (auto notes)
59+
uses: softprops/action-gh-release@v2
60+
with:
61+
tag_name: ${{ github.ref_name }}
62+
name: ${{ github.ref_name }}
63+
generate_release_notes: true

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# syntax=docker/dockerfile:1
22
FROM python:3.12-slim AS base
33

4+
# Install uv (pinned) from official distroless image so it's on PATH
5+
COPY --from=ghcr.io/astral-sh/uv:0.8.15 /uv /uvx /bin/
6+
47
ENV PYTHONDONTWRITEBYTECODE=1 \
58
PYTHONUNBUFFERED=1 \
69
PYTHONIOENCODING=UTF-8 \
710
PIP_NO_CACHE_DIR=1 \
811
LOGLEVEL=WARNING \
912
NO_COLOR=1 \
1013
ZENML_LOGGING_COLORS_DISABLED=true \
11-
ZENML_ENABLE_RICH_TRACEBACK=false
14+
ZENML_ENABLE_RICH_TRACEBACK=false \
15+
UV_SYSTEM_PYTHON=1 \
16+
UV_COMPILE_BYTECODE=1
1217

1318
# Optional but helpful: fresh CA certs for TLS reliability
1419
RUN apt-get update \
@@ -19,8 +24,7 @@ WORKDIR /app
1924

2025
# Install Python dependencies
2126
COPY requirements.txt /app/
22-
RUN pip install --upgrade pip setuptools wheel \
23-
&& pip install -r requirements.txt
27+
RUN uv pip install -r requirements.txt
2428

2529
# Security: non-root user
2630
RUN useradd -m -u 10001 appuser

0 commit comments

Comments
 (0)