Skip to content

Commit

Permalink
Make CI and deployment.yaml share the same dependency install script
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed Aug 30, 2023
1 parent 25b84f4 commit 9586c5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,4 @@ jobs:
- name: Install eval deps
run: |
export IMAGE_SUFFIX='-venv:${{ inputs.version }}'
export PYTHONUSERBASE=/snekbox/user_base
docker compose run \
--rm -T --entrypoint /bin/sh snekbox -c \
find /lang/python -mindepth 1 -maxdepth 1 -type d -exec \
{}/bin/python -m pip install --user -U -r requirements/eval-deps.pip \;
docker compose run --rm -T --entrypoint /bin/sh snekbox scripts/install_eval_deps.sh
11 changes: 2 additions & 9 deletions deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,15 @@ spec:
app: snekbox
spec:
initContainers:
# Ensure "dry-run-deploy" job of test.yaml is updated with any changes to this init container
- name: deps-install
image: ghcr.io/python-discord/snekbox:latest
imagePullPolicy: Always
volumeMounts:
- name: snekbox-user-base-volume
mountPath: /snekbox/user_base
env:
- name: PYTHONUSERBASE
value: /snekbox/user_base
command:
- "/bin/sh"
- "-c"
- >-
find /lang/python -mindepth 1 -maxdepth 1 -type d -exec
{}/bin/python -m pip install --user -U -r requirements/eval-deps.pip \;
- /bin/sh
- scripts/install_eval_deps.sh
containers:
- name: snekbox
image: ghcr.io/python-discord/snekbox:latest
Expand Down
3 changes: 3 additions & 0 deletions scripts/install_eval_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export PYTHONUSERBASE=/snekbox/user_base
find /lang/python -mindepth 1 -maxdepth 1 -type d -exec \
{}/bin/python -m pip install --user -U -r requirements/eval-deps.pip \;

0 comments on commit 9586c5b

Please sign in to comment.