Skip to content

Commit 03585a7

Browse files
committed
fix(docker): [testpypi]
1 parent 07a5bee commit 03585a7

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.docker/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
# ActivationScope Dockerfile
2+
# Uses manylinux_2_28 base to produce wheels compatible with Python packaging standards.
3+
# PyPI rejects bare linux_x86_64 tags; wheels built here get proper manylinux_2_28_x86_64 tags.
24

3-
# Stage‑0 build args — only visible to FROM lines below.
45
ARG PYTHON_VERSION=3.10
6+
FROM quay.io/pypa/manylinux_2_28_x86_64
57

6-
FROM python:${PYTHON_VERSION}-slim
7-
8-
# Re‑declare args so they are visible inside the build stage.
8+
# Re-declare args so they are visible inside the build stage.
99
ARG PYTORCH_VERSION=2.5.1
1010
ARG PLATFORM=cpu
1111

12-
RUN apt-get update && \
13-
apt-get install -y --no-install-recommends git g++ build-essential && \
14-
rm -rf /var/lib/apt/lists/*
12+
# manylinux is AlmaLinux 8 (RHEL-family) — use dnf, not apt-get.
13+
# Copy target Python and pip into /usr/local/bin so bare "python" / "pip" resolve correctly
14+
# for every subsequent RUN and for the CI wheel-build step on docker run.
15+
RUN dnf install -y gcc-c++ git && \
16+
dnf clean all && \
17+
PY="$(echo $PYTHON_VERSION | sed 's/3\.\([0-9]\)/cp3\1-cp3\1/')" && \
18+
cp /opt/python/$PY/bin/pip /usr/local/bin/ && \
19+
cp /opt/python/$PY/bin/python* /usr/local/bin/ && \
20+
pip install --upgrade pip setuptools wheel
1521

1622
WORKDIR /src
1723

1824
# Generate pyproject.toml in-container (it is git-ignored and built dynamically)
1925
COPY utils/generate-pyproject.py utils/matrix.py ./utils/
2026
COPY matrix.yml pyproject.toml.template setup.py ./
2127
RUN pip install --no-cache-dir pyyaml && python utils/generate-pyproject.py
28+
2229
COPY activationscope/ ./activationscope/
2330
COPY csrc/ ./csrc/
2431

0 commit comments

Comments
 (0)