Skip to content

Commit 6d73156

Browse files
committed
update
1 parent bedbf7a commit 6d73156

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docker.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ let
6666
# Create writable site-packages directory if it doesn't exist
6767
mkdir -p /usr/local/lib/python3.12/site-packages
6868
69+
# Ensure the directory is writable and has correct permissions
70+
chmod 755 /usr/local/lib/python3.12/site-packages
71+
6972
# Restrict system tool access - ensure util-linux tools are accessible
7073
export PATH="${pkgs.coreutils}/bin:${pkgs.util-linux}/bin:/usr/local/bin:/usr/bin"
7174
@@ -242,6 +245,9 @@ finally:
242245
export UV_PYTHON_PREFERENCE="system"
243246
export UV_LINK_MODE="copy"
244247
248+
# Configure uv to install packages to writable directory
249+
export UV_PYTHON_SITE_PACKAGES="/usr/local/lib/python3.12/site-packages"
250+
245251
# Restrict network access - only allow HTTPS
246252
export HTTP_PROXY=""
247253
export HTTPS_PROXY=""
@@ -429,6 +435,7 @@ in
429435
# Force uv to use system Python
430436
"UV_PYTHON_PREFERENCE=system"
431437
"UV_LINK_MODE=copy"
438+
"UV_PYTHON_SITE_PACKAGES=/usr/local/lib/python3.12/site-packages"
432439
# Set PATH to include our secure commands - ensure util-linux tools are accessible
433440
"PATH=${writablePython}/bin:${runtimeEnv}/bin:${pkgs.coreutils}/bin:${pkgs.util-linux}/bin:/usr/local/bin:/usr/bin"
434441
# Set library search path

0 commit comments

Comments
 (0)