File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 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=""
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
You can’t perform that action at this time.
0 commit comments