Skip to content

Commit 437ddd3

Browse files
jgallowa07claude
andcommitted
Use ARG for platform specification and fix Python 3.11 compatibility
- Move platform specification from --platform flag to ARG TARGETPLATFORM in Dockerfiles - Fix deprecated 'rU' file mode in tabulate_naive_probs.py (removed in Python 3.11) - Standardize indentation in Dockerfile.base RUN commands 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ea02276 commit 437ddd3

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#
55
# Platform is set to linux/amd64 because partis-bcr contains x86-specific code (SSE2 intrinsics)
66
# RevBayes with bundled Boost gives ~180x faster MCMC performance than v1.3.0+ without Boost
7+
ARG TARGETPLATFORM=linux/amd64
78

89
# Stage 1: Get pre-compiled RevBayes with bundled Boost from Buster base image
9-
FROM --platform=linux/amd64 quay.io/matsengrp/linearham:2025-12-01-base-image AS revbayes-builder
10+
FROM quay.io/matsengrp/linearham:2025-12-01-base-image AS revbayes-builder
1011

1112
# Stage 2: Modern Debian Bookworm for Python packages
12-
FROM --platform=linux/amd64 debian:bookworm-slim
13+
FROM debian:bookworm-slim
1314

1415
# Metadata labels
1516
LABEL org.opencontainers.image.source="https://github.com/matsengrp/linearham"

Dockerfile.base

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
ARG TARGETPLATFORM=linux/amd64
99
# Use Debian Buster (oldoldstable) for g++ 8.3 compatibility with older RevBayes
10-
FROM --platform=${TARGETPLATFORM} debian:buster-slim
10+
FROM debian:buster-slim
1111

1212
# Set TERM to enable colored-traceback to work in non-TTY environments
1313
ENV TERM=xterm
@@ -19,8 +19,8 @@ LABEL org.opencontainers.image.licenses="GPL-3.0"
1919

2020
# Configure apt to use archive repositories (Buster is now archived)
2121
RUN echo "deb http://archive.debian.org/debian/ buster main contrib non-free" > /etc/apt/sources.list && \
22-
echo "deb http://archive.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list && \
23-
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until
22+
echo "deb http://archive.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list && \
23+
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until
2424

2525
# Install all dependencies needed for building RevBayes and linearham
2626
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -77,8 +77,8 @@ RUN ./build.sh
7777

7878
# Install RevBayes to standard location
7979
RUN mkdir -p /usr/local/bin && \
80-
cp /tmp/revbayes/projects/cmake/rb /usr/local/bin/rb && \
81-
chmod +x /usr/local/bin/rb
80+
cp /tmp/revbayes/projects/cmake/rb /usr/local/bin/rb && \
81+
chmod +x /usr/local/bin/rb
8282

8383
# Clean up build artifacts to reduce image size
8484
RUN rm -rf /tmp/revbayes

scripts/tabulate_naive_probs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
aa_naive_seqs_d = {("naive" + str(i)): seq for i, seq in enumerate(aa_naive_seqs)}
3636
write_to_fasta(aa_naive_seqs_d, args.output_base + ".fasta")
3737

38-
with open(args.output_base + ".fasta", "rU") as f:
38+
with open(args.output_base + ".fasta", "r") as f:
3939
seqs = w.read_seq_data(f)
4040
data = w.LogoData.from_seqs(seqs)
4141
subprocess.check_call(("rm " + args.output_base + ".fasta").split())

0 commit comments

Comments
 (0)