From 123b113d56ed8b860928791bd0eb8c8e18738039 Mon Sep 17 00:00:00 2001
From: Christof Kaufmann <christof.kaufmann@hs-bochum.de>
Date: Mon, 13 Jan 2025 18:06:10 +0100
Subject: [PATCH] Workaround permission error of gdb package

---
 keras3-cpu/Dockerfile  | 4 +++-
 keras3-gpu/Dockerfile  | 4 +++-
 pytorch-gpu/Dockerfile | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/keras3-cpu/Dockerfile b/keras3-cpu/Dockerfile
index eb9f984..bb0e19b 100644
--- a/keras3-cpu/Dockerfile
+++ b/keras3-cpu/Dockerfile
@@ -81,7 +81,9 @@ RUN wget --no-hsts -q -O vscode_cli.tar.gz 'https://code.visualstudio.com/sha/do
     tar -xf vscode_cli.tar.gz --directory /usr/local/bin && \
     rm vscode_cli.tar.gz && \
     chown ${NB_USER} /usr/local/bin/code && \
-    fix-permissions /usr/local/bin/code
+    fix-permissions /usr/local/bin/code && \
+    # fix issue with permissions of /opt/conda/share/gdb/auto-load/opt
+    fix-permissions "${CONDA_DIR}"
 
 # install some packages
 USER ${NB_UID}
diff --git a/keras3-gpu/Dockerfile b/keras3-gpu/Dockerfile
index 0abbb86..b2a38e3 100644
--- a/keras3-gpu/Dockerfile
+++ b/keras3-gpu/Dockerfile
@@ -36,7 +36,9 @@ RUN wget --no-hsts -q -O vscode_cli.tar.gz 'https://code.visualstudio.com/sha/do
     tar -xf vscode_cli.tar.gz --directory /usr/local/bin && \
     rm vscode_cli.tar.gz && \
     chown ${NB_USER} /usr/local/bin/code && \
-    fix-permissions /usr/local/bin/code
+    fix-permissions /usr/local/bin/code && \
+    # fix issue with permissions of /opt/conda/share/gdb/auto-load/opt
+    fix-permissions "${CONDA_DIR}"
 
 # install some packages
 USER ${NB_UID}
diff --git a/pytorch-gpu/Dockerfile b/pytorch-gpu/Dockerfile
index 39c75e2..a992f32 100644
--- a/pytorch-gpu/Dockerfile
+++ b/pytorch-gpu/Dockerfile
@@ -36,7 +36,9 @@ RUN wget --no-hsts -q -O vscode_cli.tar.gz 'https://code.visualstudio.com/sha/do
     tar -xf vscode_cli.tar.gz --directory /usr/local/bin && \
     rm vscode_cli.tar.gz && \
     chown ${NB_USER} /usr/local/bin/code && \
-    fix-permissions /usr/local/bin/code
+    fix-permissions /usr/local/bin/code && \
+    # fix issue with permissions of /opt/conda/share/gdb/auto-load/opt
+    fix-permissions "${CONDA_DIR}"
 
 # install some packages
 # NOTE: without --no-update-deps somehow an undefined symbol error in /opt/conda/lib/python3.11/lib-dynload/_sqlite3.cpython-311-x86_64-linux-gnu.so occurs, which crashes jupyter lab.
-- 
GitLab