From 77c94067a33b3d82798ce85882786fcffbcb85c8 Mon Sep 17 00:00:00 2001
From: "Dutta, Ayushi (PG/R - Comp Sci & Elec Eng)" <ayushi.dutta@surrey.ac.uk>
Date: Wed, 16 Apr 2025 08:52:30 +0000
Subject: [PATCH] libffi8 fix

---
 container.def | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/container.def b/container.def
index 4db1718..9d645c5 100644
--- a/container.def
+++ b/container.def
@@ -8,6 +8,16 @@ From: nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04
     apt-get install -y \
         wget sshfs rsync curl vim bzip2 zip unzip git build-essential cmake \
         libopenblas-dev 
+
+    # Fix libffi version: remove libffi8 if present, enforce libffi7
+    apt-get remove -y libffi8 || true
+    apt-get install -y libffi7=3.3-4
+
+    # Verify runtime linking
+    ldconfig
+    echo "Checking git-remote-https linking to libffi:"
+    ldd /usr/lib/git-core/git-remote-https | grep ffi || true
+
     apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* # keep the Docker image as small as possible.
     
 %environment
@@ -17,7 +27,7 @@ From: nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04
     export TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6+PTX"
     export TCNN_CUDA_ARCHITECTURES="75;80;86"
     export CUDA_HOME=/usr/local/cuda
-    export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/lib64/stubs:$CONDA_PREFIX/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
+    export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/lib64/stubs:$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
 
 %labels
     # Add custom metadata to the container.
-- 
GitLab