-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b3bc23
commit 38a6d1e
Showing
4 changed files
with
219 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Python 3.9 | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM python:3.9 as python39 | ||
ENV QEMU_CPU=arm1176 | ||
ENV QEMU_MACHINE=versatilepb | ||
|
||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
python3-dev build-essential | ||
|
||
# Build | ||
WORKDIR /build | ||
COPY ./ ./ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade build wheel auditwheel && \ | ||
venv/bin/python3 -m build --wheel | ||
|
||
# Test | ||
WORKDIR /test | ||
COPY ./tests/ ./tests/ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade wheel pytest && \ | ||
venv/bin/pip3 install --no-index webrtc-noise-gain -f /build/dist/ && \ | ||
venv/bin/pytest tests | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Python 3.10 | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM python:3.10 as python310 | ||
ENV QEMU_CPU=arm1176 | ||
ENV QEMU_MACHINE=versatilepb | ||
|
||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
python3-dev build-essential | ||
|
||
# Build | ||
WORKDIR /build | ||
COPY ./ ./ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade build wheel auditwheel && \ | ||
venv/bin/python3 -m build --wheel | ||
|
||
# Test | ||
WORKDIR /test | ||
COPY ./tests/ ./tests/ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade wheel pytest && \ | ||
venv/bin/pip3 install --no-index webrtc-noise-gain -f /build/dist/ && \ | ||
venv/bin/pytest tests | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Python 3.11 | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM python:3.11 as python311 | ||
ENV QEMU_CPU=arm1176 | ||
ENV QEMU_MACHINE=versatilepb | ||
|
||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
python3-dev build-essential | ||
|
||
# Build | ||
WORKDIR /build | ||
COPY ./ ./ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade build wheel auditwheel && \ | ||
venv/bin/python3 -m build --wheel | ||
|
||
# Test | ||
WORKDIR /test | ||
COPY ./tests/ ./tests/ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade wheel pytest && \ | ||
venv/bin/pip3 install --no-index webrtc-noise-gain -f /build/dist/ && \ | ||
venv/bin/pytest tests | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM scratch | ||
ARG TARGETARCH | ||
ARG TARGETVARIANT | ||
|
||
COPY --from=python39 /build/dist/*.whl ./ | ||
COPY --from=python310 /build/dist/*.whl ./ | ||
COPY --from=python311 /build/dist/*.whl ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Python 3.9 | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM python:3.9 as python39 | ||
|
||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
python3-dev build-essential | ||
|
||
# Build | ||
WORKDIR /build | ||
COPY ./ ./ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade build wheel auditwheel && \ | ||
venv/bin/python3 -m build --wheel | ||
|
||
# Test | ||
WORKDIR /test | ||
COPY ./tests/ ./tests/ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade wheel pytest && \ | ||
venv/bin/pip3 install --no-index webrtc-noise-gain -f /build/dist/ && \ | ||
venv/bin/pytest tests | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Python 3.10 | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM python:3.10 as python310 | ||
|
||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
python3-dev build-essential | ||
|
||
# Build | ||
WORKDIR /build | ||
COPY ./ ./ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade build wheel auditwheel && \ | ||
venv/bin/python3 -m build --wheel | ||
|
||
# Test | ||
WORKDIR /test | ||
COPY ./tests/ ./tests/ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade wheel pytest && \ | ||
venv/bin/pip3 install --no-index webrtc-noise-gain -f /build/dist/ && \ | ||
venv/bin/pytest tests | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Python 3.11 | ||
# ----------------------------------------------------------------------------- | ||
|
||
FROM python:3.11 as python311 | ||
|
||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install --yes --no-install-recommends \ | ||
python3-dev build-essential | ||
|
||
# Build | ||
WORKDIR /build | ||
COPY ./ ./ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade build wheel auditwheel && \ | ||
venv/bin/python3 -m build --wheel | ||
|
||
# Test | ||
WORKDIR /test | ||
COPY ./tests/ ./tests/ | ||
RUN python3 -m venv venv && \ | ||
venv/bin/pip3 install --upgrade pip && \ | ||
venv/bin/pip3 install --upgrade wheel pytest && \ | ||
venv/bin/pip3 install --no-index webrtc-noise-gain -f /build/dist/ && \ | ||
venv/bin/pytest tests | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM scratch | ||
ARG TARGETARCH | ||
ARG TARGETVARIANT | ||
|
||
COPY --from=python39 /build/dist/*.whl ./ | ||
# COPY --from=python310 /build/dist/*.whl ./ | ||
# COPY --from=python311 /build/dist/*.whl ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
.PHONY: clean | ||
.PHONY: clean armv6 armv7 | ||
|
||
all: | ||
docker buildx build . --platform linux/amd64,linux/arm64 --output 'type=local,dest=dist' | ||
|
||
armv6: | ||
mkdir -p dist/linux_armv6 | ||
docker buildx build . -f Dockerfile.armv6 --platform linux/arm/v6 --output 'type=local,dest=dist/linux_armv6' | ||
|
||
armv7: | ||
mkdir -p dist/linux_armv7 | ||
docker buildx build . -f Dockerfile.armv7 --platform linux/arm/v7 --output 'type=local,dest=dist/linux_armv7' | ||
|
||
clean: | ||
rm -rf dist |