Set CUDA_CACHE_DISABLE

This commit is contained in:
Matthias Krack 2026-02-16 21:35:54 +01:00
parent e75f387824
commit f24c03a905
3 changed files with 24 additions and 0 deletions

View file

@ -39,6 +39,10 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
# Setup CUDA environment
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
ARG SPACK_CACHE="s3://spack-cache --s3-endpoint-url=http://localhost:9000"
# Copy CP2K repository into container
@ -64,6 +68,10 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
# Setup CUDA environment
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
WORKDIR /opt/cp2k
# Install CP2K dependencies built with spack

View file

@ -39,6 +39,10 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
# Setup CUDA environment
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
ARG SPACK_CACHE="s3://spack-cache --s3-endpoint-url=http://localhost:9000"
# Copy CP2K repository into container
@ -64,6 +68,10 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
# Setup CUDA environment
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
WORKDIR /opt/cp2k
# Install CP2K dependencies built with spack

View file

@ -821,6 +821,10 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
output += rf"""
# Setup CUDA environment
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
"""
elif stage == "install":
output = rf"""
@ -859,6 +863,10 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
output += rf"""
# Setup CUDA environment
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
"""
else:
print(f"\nERROR: Unknown stage {stage} specified\n")