Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ ARG CUDA_VERSION
# for compatible version numbers:
ARG PYTORCH_VERSION

# PyTorch scatter (used by the "survival" environment)
# is a dependency that may lag behind PyTorch releases by a few days.
# Please check https://github.com/rusty1s/pytorch_scatter for compatibility info.
#ARG PYTORCH_SCATTER_VERSION=2.1.1
# rpy2 to interface R from Python in tests:
ARG RPY2_VERSION

# KeOps relies on PyTest, Hypothesis, Beartype and Jaxtyping for unit tests...
ARG PYTEST_VERSION
Expand Down Expand Up @@ -94,10 +92,13 @@ ENV LC_ALL=C.UTF-8

FROM r-env AS conda
ARG PYTHON_VERSION
ARG RPY2_VERSION
RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
/opt/conda/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r && \
/opt/conda/bin/conda install -y python=${PYTHON_VERSION} \
conda-build \
pyyaml \
Expand All @@ -107,15 +108,17 @@ RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Mini
ipykernel && \
/opt/conda/bin/conda clean -ya
# rpy2 on conda is not supported anymore. We install it with pip:
RUN /opt/conda/bin/pip install rpy2
RUN /opt/conda/bin/pip install rpy2==${RPY2_VERSION}
# Switch default matplotlib backend to avoid issues with Qt:
ENV MPLBACKEND=tkagg


# Full CUDA installation, with the headers, from cuda-forge:
FROM conda AS cuda
ARG CUDA_VERSION
RUN /opt/conda/bin/conda install cuda=${CUDA_VERSION} -c conda-forge && \
RUN /opt/conda/bin/conda install -n base conda-libmamba-solver && \
/opt/conda/bin/conda config --set solver libmamba && \
/opt/conda/bin/conda install cuda=${CUDA_VERSION} -c conda-forge && \
/opt/conda/bin/conda clean -ya


Expand Down
20 changes: 11 additions & 9 deletions docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
# to clear the docker cache and make sure that the config works
# with the current version of e.g. the Ubuntu repositories.

# Up to date as of Monday, April 17th, 2025:
# Up to date as of Tuesday, August 26th, 2025:
BASE_IMAGE=ubuntu:24.04
PYTHON_VERSION=3.12
NUMPY_VERSION=2.2.4
PYTHON_VERSION=3.13
NUMPY_VERSION=2.3.2
KEOPS_VERSION=2.3
GEOMLOSS_VERSION=0.2.6
CUDA_VERSION=12.4.1
PYTORCH_VERSION=2.6.0
PYTEST_VERSION=8.3.5
HYPOTHESIS_VERSION=6.131.1
JAXTYPING_VERSION=0.3.1
BEARTYPE_VERSION=0.20.2
CUDA_VERSION=12.8.1
PYTORCH_VERSION=2.8.0
PYTEST_VERSION=8.4.1
RPY2_VERSION=3.6.2
HYPOTHESIS_VERSION=6.138.3
JAXTYPING_VERSION=0.3.2
BEARTYPE_VERSION=0.21.0
BLACK_VERSION=25.1.0

VERSION_TAG=${KEOPS_VERSION}-geomloss${GEOMLOSS_VERSION}-cuda${CUDA_VERSION}-pytorch${PYTORCH_VERSION}-python${PYTHON_VERSION}
Expand All @@ -39,6 +40,7 @@ do
--build-arg CUDA_VERSION=${CUDA_VERSION} \
--build-arg PYTORCH_VERSION=${PYTORCH_VERSION} \
--build-arg PYTEST_VERSION=${PYTEST_VERSION} \
--build-arg RPY2_VERSION=${RPY2_VERSION} \
--build-arg HYPOTHESIS_VERSION=${HYPOTHESIS_VERSION} \
--build-arg JAXTYPING_VERSION=${JAXTYPING_VERSION} \
--build-arg BEARTYPE_VERSION=${BEARTYPE_VERSION} \
Expand Down