Skip to content

Commit

Permalink
Merge pull request #15 from alan-turing-institute/python-migration
Browse files Browse the repository at this point in the history
Fix Docker build issues
  • Loading branch information
jemrobinson committed Sep 24, 2024
2 parents 0020a09 + 7b352df commit 41b4474
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/test_code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy
pull_request:

jobs:
test_bash:
test_code:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -22,6 +22,12 @@ jobs:
- name: Install hatch
run: pip install hatch

- name: Install requirements
run: |
sudo apt-get install \
libldap2-dev \
libsasl2-dev
- name: Test Python
run: hatch run test:all

Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

## Install build prerequisites
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
dumb-init \
Expand All @@ -34,6 +35,7 @@ RUN /root/.local/bin/hatch run pip freeze | grep -v "^-e" > requirements.txt &&
sed -i "s/psycopg=/psycopg[c]=/g" requirements.txt && \
python -m pip wheel --no-cache-dir --no-binary :all: --wheel-dir /app/repairable -r requirements.txt && \
python -m pip install auditwheel && \
mkdir -p /app/wheels && \
for WHEEL in /app/repairable/*.whl; do \
auditwheel repair --wheel-dir /app/wheels --plat manylinux_2_34_aarch64 "${WHEEL}" 2> /dev/null || mv "${WHEEL}" /app/wheels/; \
done;
Expand Down

0 comments on commit 41b4474

Please sign in to comment.