Skip to content

Commit

Permalink
32bit env helper
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Jul 26, 2024
1 parent 4d6bb97 commit 99295c9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env.32
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUILDKIT_PROGRESS=plain
COMPOSE_FILE=docker-compose-32bit.yml:docker-compose.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.tox
.env
/dist
\.*.cfg
*.egg-info
Expand Down
22 changes: 18 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
ARG PY_VER=3.12.1
FROM python:${PY_VER}
ARG BASE=${BASE:-python:${PY_VER}}
FROM $BASE
WORKDIR /app
ADD *.rst LICENSE MANIFEST.in *.txt *.cfg *.py *.ini ./
ADD requirements/ ./requirements/
RUN mkdir src/ && touch src/__init__.py
RUN pip install -r req*/base.txt
RUN pip install -r req*/release.txt
RUN pip install -r req*/test.txt
RUN apt update && apt install -y python3-dev libpython3-dev
RUN <<EOF
if ! ( python --version );then
ln -s /usr/bin/python3 /usr/bin/python
fi
if ! ( pip --version );then
wget https://bootstrap.pypa.io/get-pip.py
chmod +x get-pip.py
./get-pip.py --break-system-packages
fi
EOF
RUN pip install --break-system-packages -r req*/base.txt
RUN if ( ! cargo --version );then apt update && apt install -y cargo;fi
ENV CFLAGS="-I/usr/include/python3.12/"
RUN pip install --break-system-packages -r req*/test.txt
RUN pip install --break-system-packages -r req*/release.txt
ADD *.rst LICENSE MANIFEST.in *.txt *.sh *.cfg *.py *.ini ./
ADD src/ src/
ENTRYPOINT /app/docker-entry.sh
12 changes: 12 additions & 0 deletions docker-compose-32bit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.8"
services:
app:
build:
context: "."
args:
# BASE: "corpusops/debian-32:bookworm"
BASE: "corpusops/debian-32:trixie"
volumes:
- ./src:/app/src
- ./setup.py:/app/setup.py
- ./docker-entry.sh:/app/docker-entry.sh

0 comments on commit 99295c9

Please sign in to comment.