Skip to content

Commit bedbf7a

Browse files
committed
update
1 parent e62c132 commit bedbf7a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docker.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ let
4646
fi
4747
done
4848
49-
# Create a writable site-packages directory
50-
mkdir -p $out/lib/python3.12/site-packages
51-
chmod -R 755 $out/lib/python3.12/site-packages
49+
# Create a symlink to the original site-packages for reading
50+
ln -sf ${pythonWithPackages}/lib/python3.12/site-packages $out/lib/python3.12/site-packages
5251
'';
5352
};
5453

@@ -64,6 +63,9 @@ let
6463
# Set restricted sys.path, only allow access to safe packages
6564
export PYTHONPATH="/app:/usr/local/lib/python3.12/site-packages"
6665
66+
# Create writable site-packages directory if it doesn't exist
67+
mkdir -p /usr/local/lib/python3.12/site-packages
68+
6769
# Restrict system tool access - ensure util-linux tools are accessible
6870
export PATH="${pkgs.coreutils}/bin:${pkgs.util-linux}/bin:/usr/local/bin:/usr/bin"
6971
@@ -322,6 +324,7 @@ finally:
322324
mkdir -p $out/etc/passwd.d
323325
mkdir -p $out/etc/group.d
324326
mkdir -p $out/etc/shadow.d
327+
mkdir -p $out/usr/local/lib/python3.12/site-packages
325328
326329
# Create uv configuration
327330
cat > $out/etc/uv/uv.toml << 'EOF'

0 commit comments

Comments
 (0)