Skip to content
Open
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 51 additions & 24 deletions relink-1.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,73 @@
FROM python:3.12-slim
FROM python:3.12-slim AS build

# Metadata
LABEL base_image="python:3.12-slim"
LABEL version="1"
LABEL software="relink"
LABEL software.version="1.0.0"
LABEL about.summary="Container for relink pipeline: xiSEARCH, xiFDR, and Python dependencies for crosslinking mass spectrometry analysis"
LABEL about.summary="Container for relink pipeline: xiSEARCH, xiFDR, Scout, and Dotnet / Python dependencies for crosslinking mass spectrometry analysis"
LABEL about.home="https://github.com/bigbio/relink"
LABEL about.documentation="https://github.com/bigbio/relink"
LABEL about.license="Apache-2.0"
LABEL about.tags="Proteomics,Crosslinking,Mass Spectrometry"
LABEL maintainer="Yasset Perez-Riverol <[email protected]>"

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

# Install Java runtime (required for xiSEARCH and xiFDR)
# Build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-21-jre \
wget \
unzip \
build-essential \
libgomp1 \
procps \
&& rm -rf /var/lib/apt/lists/*
wget \
unzip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* && \
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb \
-O packages-microsoft-prod.deb

# Create directory for xiSEARCH
RUN mkdir -p /opt/xisearch

# Download and install xiSEARCH 1.8.11
RUN wget --no-check-certificate \
# Install xiSEARCH 1.8.11 and xiFDR
RUN mkdir -p /opt/xisearch && wget -q \
https://www.rappsilberlab.org/wp-content/uploads/2025/12/xiSEARCH_1.8.11.zip \
-O /tmp/xiSEARCH.zip && \
unzip /tmp/xiSEARCH.zip -d /opt/xisearch && \
rm /tmp/xiSEARCH.zip && \
cp /opt/xisearch/xiSEARCH_1.8.11/xiSEARCH.jar /opt/xisearch/xiSEARCH.jar && \
cp /opt/xisearch/xiSEARCH_1.8.11/xiFDR-2.3.10.jar /opt/xisearch/xiFDR.jar

# Install Scout 2.0.0
RUN mkdir -p /opt/scout && wget -q \
https://github.com/diogobor/Scout/releases/download/2.0.0/Scout_Linux64.zip \
-O /tmp/Scout.zip && \
unzip /tmp/Scout.zip -d /opt/scout && \
rm /tmp/Scout.zip && \
mv /opt/scout/Scout_Linux64/* /opt/scout && \
rmdir /opt/scout/Scout_Linux64

FROM python:3.12-slim AS runtime

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1

COPY --from=build packages-microsoft-prod.deb packages-microsoft-prod.deb

# Install Java runtime (required for xiSEARCH and xiFDR) Dotnet runtime, MPFR, and GMP (required for Scout)
RUN dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt-get update && apt-get install -y --no-install-recommends \
dotnet-runtime-9.0 \
libmpfr6 \
libgmp10 \
openjdk-21-jre \
&& rm -rf /var/lib/apt/lists/*

# Copy xiSEARCH 1.8.11 and xiFDR from build stage
COPY --from=build /opt/xisearch /opt/xisearch

# Copy Scout 2.0.0 from build stage
COPY --from=build /opt/scout /opt/scout

# Set necessary env for scout
ENV mpfr_path=/usr/lib/x86_64-linux-gnu gmp_path=/usr/lib/x86_64-linux-gnu

# Install Python packages for mass recalibration
# Using versions from pycross requirements.txt (pyopenms version left open for pip to resolve)
RUN pip install --no-cache-dir \
Expand All @@ -62,17 +92,14 @@ RUN pip install --no-cache-dir \
six==1.17.0 \
tzdata==2025.2

# Clean up build tools (keep Java runtime)
RUN apt-get remove -y wget unzip build-essential && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /data/

# Verify installation
RUN java -jar /opt/xisearch/xiSEARCH.jar --help || echo "xiSEARCH installed" && \
RUN java -jar /opt/xisearch/xiSEARCH.jar --help 1>/dev/null && echo "xiSEARCH installed" && \
ls -lh /opt/xisearch/*.jar && \
test $(dotnet /opt/scout/Scout_Unix.dll | grep "ERROR" | wc -l) -eq 1 && \
dotnet /opt/scout/Scout_Unix.dll | grep "ERROR: Please specify the following arguments:" && echo "Scout installed" && \
ls -lh /opt/scout/Scout_Unix.dll && \
python -c "import pyopenms; print(f'pyopenms {pyopenms.__version__}')" && \
python -c "import polars; print(f'polars {polars.__version__}')"