docker: copy LICENSE/README and src into builder; fix FROM casing; build wheels correctly

This commit is contained in:
d-k-patel
2025-08-19 15:06:56 +05:30
parent 143ec91c84
commit 893724c769

View File

@@ -1,5 +1,5 @@
# Multi-stage Docker build for aiclip
FROM python:3.11-slim as builder
FROM python:3.11-slim AS builder
# Install system dependencies
RUN apt-get update && apt-get install -y \
@@ -9,7 +9,8 @@ RUN apt-get update && apt-get install -y \
# Install Python dependencies
WORKDIR /app
COPY pyproject.toml ./
COPY pyproject.toml README.md LICENSE ./
COPY src ./src
RUN pip install --no-cache-dir build && \
python -m build --wheel && \
pip wheel --no-cache-dir --wheel-dir /app/wheels .