Skip to content

Commit

Permalink
Partially revert distutils fix (#19)
Browse files Browse the repository at this point in the history
* Partially revert distutils fix

* Add PYTHON_DISTUTILS arg

* Add back stdlib

* Always include -minimal

* Revert "Always include -minimal"

This reverts commit 1e63588.

* Add smoketest
  • Loading branch information
ddelange authored May 8, 2024
1 parent 21e12fd commit badde08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ jobs:
build-args: |
BASE_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/base
BASE_TAG=${{ github.event_name != 'pull_request' && github.sha || 'master' }}
PYTHON_MINOR_VERSION=${{ matrix.python_minor_version }}${{ (matrix.python_minor_version < 12 && '-distutils') || '' }}
PYTHON_MINOR_VERSION=${{ matrix.python_minor_version }}
PYTHON_DISTUTILS=${{ (matrix.python_minor_version < 12 && '-distutils') || '-minimal' }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.image }}:${{ (startsWith(matrix.image, 'runtime') && format('3.{0}-', matrix.python_minor_version)) || '' }}buildcache
cache-to: ${{ github.event_name != 'pull_request' && env.CACHE_TO_STRING || '' }}
provenance: false
Expand Down
5 changes: 4 additions & 1 deletion runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ ARG BASE_TAG
FROM ${BASE_IMAGE}:${BASE_TAG}

ARG PYTHON_MINOR_VERSION
RUN apt-install python3.${PYTHON_MINOR_VERSION}
ARG PYTHON_DISTUTILS
RUN apt-install \
python3.${PYTHON_MINOR_VERSION}${PYTHON_DISTUTILS} \
libpython3.${PYTHON_MINOR_VERSION}-stdlib
2 changes: 2 additions & 0 deletions vanilla/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ RUN python3.${PYTHON_MINOR_VERSION} -m venv ${VIRTUAL_ENV} && \
FROM ghcr.io/ddelange/pycuda/runtime:3.${PYTHON_MINOR_VERSION}-master

COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}

RUN python -c "print('hello world')" && pip install ipdb

0 comments on commit badde08

Please sign in to comment.