Skip to content
Sam Gross edited this page May 17, 2022 · 7 revisions

Building modified pip package

Build the pip wheel. It can be built with CPython or nogil Python.

git clone https://github.com/colesbury/pip.git -b 21.3.1-nogil
cd pip
pip wheel .

Copy the wheel to nogil Python:

cp pip-21.3.1-py3-none-any.whl ../nogil/Lib/ensurepip/_bundled/

Edit _PIP_VERSION in Lib/ensurepip/__init__.py

Building the Docker images

These are notes on how to build the Docker images.

today=$(date +%Y-%m-%d)
commit=$(git rev-parse HEAD)

Build Python image

docker build -t "nogil/python" --build-arg commit=$commit docker/
docker tag "nogil/python" "nogil/python:$today"
docker push "nogil/python:$today"
docker push nogil/python

Build Python+CUDA image

docker build -t "nogil/python-cuda" --build-arg commit=$commit docker/cuda/
docker tag "nogil/python-cuda" "nogil/python-cuda:$today"
docker push "nogil/python-cuda:$today"
docker push nogil/python-cuda

Build manylinux2014_x86_64 image (for pip packages)

Needs docker-buildx

git clone https://github.com/colesbury/manylinux -b nogil
cd manylinux
PLATFORM=$(uname -m) POLICY=manylinux2014 PYTHON_VERSION=3.9.10 COMMIT_SHA=$commit ./build.sh

Tag and push

docker tag nogil/manylinux2014_x86_64:$commit nogil/manylinux2014_x86_64:latest
docker push nogil/manylinux2014_x86_64:$commit
docker push nogil/manylinux2014_x86_64:latest