Skip to content

Commit 70d0e1a

Browse files
committed
Install eval dependencies with --user & ensure user base var is set
Due to the way that `find` executes -exec arguments we need to run the pip install's inside another `sh` instance so that the PYTHONUSERBASE environment variable is correctly picked up. Additionally, we need to specify `--user` so that pip respects the PYTHONUSERBASE variable at all.
1 parent 0b0b0fd commit 70d0e1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ spec:
3131
- "-c"
3232
- >-
3333
find /lang/python -mindepth 1 -maxdepth 1 -type d -exec
34-
PYTHONUSERBASE=/snekbox/user_base &&
35-
{}/bin/python -m pip install -U
34+
sh -c 'PYTHONUSERBASE=/snekbox/user_base &&
35+
{}/bin/python -m pip install --user -U
3636
anyio[trio]~=3.6
3737
arrow~=1.2
3838
attrs~=22.2
@@ -56,7 +56,7 @@ spec:
5656
typing-extensions~=4.4
5757
tzdata~=2022.7
5858
yarl~=1.8
59-
\;
59+
' \;
6060
volumes:
6161
- name: snekbox-user-base-volume
6262
hostPath:

0 commit comments

Comments
 (0)