22# Using the Ubuntu base image
33FROM ubuntu:24.04
44
5+ # Build arguments for Cell Ranger version and download URL
6+ # Users must obtain their own download URL from 10x Genomics after accepting
7+ # their license agreement: https://www.10xgenomics.com/support/software/cell-ranger/downloads
8+ ARG CELLRANGER_VERSION
9+ ARG CELLRANGER_URL
10+
511# Adding labels for the GitHub Container Registry
612LABEL org.opencontainers.image.title="cellranger"
713LABEL org.opencontainers.image.description="Container image for the use of Cell Ranger in Fred Hutch OCDO's WILDS"
8- LABEL org.opencontainers.image.version="10.0.0 "
14+ LABEL org.opencontainers.image.version="${CELLRANGER_VERSION} "
915LABEL org.opencontainers.image.authors="wilds@fredhutch.org"
1016LABEL org.opencontainers.image.url=https://hutchdatascience.org/
1117LABEL org.opencontainers.image.documentation=https://getwilds.org/
@@ -15,6 +21,19 @@ LABEL org.opencontainers.image.licenses=MIT
1521# Set the shell option to fail if any command in a pipe fails
1622SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1723
24+ # Validate that required build arguments were provided
25+ RUN if [ -z "${CELLRANGER_VERSION}" ]; then \
26+ echo "ERROR: CELLRANGER_VERSION build argument is required." && \
27+ echo "Example: --build-arg CELLRANGER_VERSION=10.0.0" && \
28+ exit 1; \
29+ fi
30+ RUN if [ -z "${CELLRANGER_URL}" ]; then \
31+ echo "ERROR: CELLRANGER_URL build argument is required." && \
32+ echo "Please obtain a download URL from 10x Genomics:" && \
33+ echo "https://www.10xgenomics.com/support/software/cell-ranger/downloads" && \
34+ exit 1; \
35+ fi
36+
1837# Installing prerequisites
1938RUN apt-get update \
2039 && BUILD_ESSENTIAL_VERSION=$(apt-cache policy build-essential | grep Candidate | awk '{print $2}') \
@@ -41,19 +60,18 @@ RUN apt-get update \
4160 && rm -rf /var/lib/apt/lists/*
4261
4362# Download and install Cell Ranger pre-built binary
44- # Note: The download URL contains a signed key that expires .
45- # A new download URL should be obtained from 10x Genomics each time this Dockerfile is updated .
46- RUN wget -q --no-check-certificate -O cellranger-10.0.0. tar.gz \
47- "https://cf.10xgenomics.com/releases/cell-exp/cellranger-10.0.0.tar.gz?Expires=1766424907&Key-Pair-Id=APKAI7S6A5RYOXBWRPDA&Signature=Se7y~SfN80~5Q61MkUOLIgsO40FlwMj6BuJjAmP6S74H7ZI6PSI8CCZgOHMoz3BUYZKhKwI~oC5sUqUqMbzw3wbmJcmrhPneNagGvnDwRmULTA6Smyn4K7A-k0t7qjVW5W8aiERueW5057JJk4LKPZJHKoV7tqMVA5beAU4Ari2Deu5K5hHKfNK0OWIYl9mxlAP8mg2Go6KzhOVFKAQy-VzoqpGFSOW3jSnHAMrOhHtpX4jdhshm-Kca2NeSAZome4j6uPfUyKYdQRWTwOI1EgXcyRFRBHEQe6TVsOt4IqxtCYKEgjLm3SDt5f5Nzds5plRJ~V2jpcG-ew5ABnUXNg__ " \
48- && tar -xzf cellranger-10.0.0. tar.gz \
49- && rm -rf cellranger-10.0.0. tar.gz
63+ # The download URL must be obtained from 10x Genomics after accepting their license agreement .
64+ # URLs contain a signed key that expires, so a fresh URL is needed for each build .
65+ RUN wget -q --no-check-certificate -O " cellranger-${CELLRANGER_VERSION}. tar.gz" \
66+ "${CELLRANGER_URL} " \
67+ && tar -xzf " cellranger-${CELLRANGER_VERSION}. tar.gz" \
68+ && rm -rf " cellranger-${CELLRANGER_VERSION}. tar.gz"
5069
5170# Set environment variables
52- ENV PATH="${PATH}:/cellranger-10.0.0 "
71+ ENV PATH="${PATH}:/cellranger-${CELLRANGER_VERSION} "
5372
5473# Set working directory
5574WORKDIR /data
5675
5776# Smoke test (NOTE: Cell Ranger only works on x86_64 Linux)
5877RUN cellranger --version
59-
0 commit comments