Skip to content

Commit d686ad3

Browse files
committed
perf: add next support
perf: support mutually dependent parent image types
1 parent 3479cda commit d686ad3

File tree

2 files changed

+53
-35
lines changed

2 files changed

+53
-35
lines changed

.github/workflows/pi_merge_submodule.yml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,67 @@ jobs:
118118
git checkout -b ${{ needs.configure-branch-name.outputs.gh_head_ref }} || git checkout ${{ needs.configure-branch-name.outputs.gh_head_ref }}
119119
git pull origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
120120
121-
- name: Compile Requirements
121+
- name: Compile Requirements (Python)
122+
if: matrix.parent_image_type != 'next'
122123
run: |
123124
pip-compile --quiet \
124125
--output-file ${{ matrix.app }}/requirements/${{ matrix.parent_image_type }}-requirements.txt \
125126
submodules/parent-images/requirements/${{ matrix.parent_image_type }}-requirements.in
126-
127-
pip-compile --quiet \
128-
--output-file ${{ matrix.app }}/requirements.txt \
129-
${{ matrix.app }}/requirements/requirements.in
130-
131-
- name: Perform Edit/Git Operations
127+
128+
- name: Compile Requirements (Next)
129+
if: matrix.parent_image_type == 'next'
130+
run: |
131+
jq --slurp '.[0] * .[1]' \
132+
package.json \
133+
${{ matrix.app }}/package.json \
134+
> package.json.tmp
135+
mv package.json.tmp ${{ matrix.app }}/package.json
136+
137+
- name: Perform Edit/Git Operations (Python)
138+
if: matrix.parent_image_type != 'next'
132139
run: |
133140
cd ${{ github.workspace }}/${{ matrix.app }}
134141
135-
git add requirements*
142+
git add requirements/${{ matrix.parent_image_type }}-requirements.in
136143
git commit -m "ci: update ${{ matrix.parent_image_type }}-requirements.txt" || true
137144
git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
138-
echo "::notice::${{ matrix.app }} updated to origin/${{ needs.configure-branch-name.outputs.gh_head_ref }}"
145+
echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }}-requirements.txt"
146+
147+
export exitcode=0
148+
pip-compile --quiet \
149+
--output-file requirements.txt \
150+
requirements/requirements.in || export exitcode=$?
151+
152+
if [ $exitcode -ne 0 ]; then
153+
echo "::error::pip-compile failed with exit code $exitcode"
154+
exit $exitcode
155+
else
156+
git add requirements.txt
157+
git commit -m "ci: update requirements.txt" || true
158+
git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
159+
echo "::notice::${{ matrix.app }} - updated requirements.txt"
160+
fi
139161
140162
gh pr create --draft \
141163
--title "${{ github.event.pull_request.title }}" \
142164
--body "${{ github.event.pull_request.body }}" \
143165
--base dev \
144166
--head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
145167
--repo ${{ github.repository_owner }}/${{ matrix.app }} || true
146-
168+
169+
- name: Perform Edit/Git Operations (Next)
170+
if: matrix.parent_image_type == 'next'
171+
run: |
172+
cd ${{ github.workspace }}/${{ matrix.app }}
173+
174+
git add package.json
175+
git commit -m "ci: update ${{ matrix.parent_image_type }} package.json" || true
176+
git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
177+
echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }} package.json"
178+
179+
gh pr create --draft \
180+
--title "${{ github.event.pull_request.title }}" \
181+
--body "${{ github.event.pull_request.body }}" \
182+
--base dev \
183+
--head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
184+
--repo ${{ github.repository_owner }}/${{ matrix.app }} || true

pi/settings.sh

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
#!/bin/bash
22

3-
export PARENT_IMAGE_TYPES=(
4-
mini
5-
common
6-
exec_env
7-
torch_cpu
8-
torch_cuda
9-
next
10-
)
11-
123
export mini=(
134
"refinery-authorizer"
14-
# "refinery-config"
15-
# "refinery-doc-ock"
165
"refinery-gateway-proxy"
17-
# "platform-monitoring"
186
)
197

208
export common=(
@@ -24,39 +12,31 @@ export common=(
2412
"refinery-updater"
2513
"refinery-weak-supervisor"
2614
"refinery-model-provider"
27-
# "refinery-commercial-proxy"
28-
# "gates-gateway"
29-
# "chat-gateway"
3015
"cognition-gateway"
16+
"${mini[@]}"
3117
)
3218

3319
export exec_env=(
3420
"refinery-ac-exec-env"
3521
"refinery-lf-exec-env"
36-
# "refinery-record-ide-env"
37-
# "gates-runtime"
38-
# "chat-exec-env"
3922
"cognition-exec-env"
4023
)
4124

4225
export torch_cpu=(
4326
"refinery-embedder"
4427
"refinery-ml-exec-env"
45-
# "refinery-zero-shot"
46-
# "hosted-inference-api"
28+
"${common[@]}"
4729
)
4830

49-
export torch_gpu=(
31+
export torch_cuda=(
5032
"refinery-embedder"
51-
# "refinery-zero-shot"
33+
"${common[@]}"
5234
)
5335

5436
export next=(
55-
# "gates-ui"
5637
"admin-dashboard"
57-
# "chat-ui"
5838
"cognition-ui"
5939
"refinery-ui"
6040
)
6141

62-
export ALL_SERVICES=( "${mini[@]}" "${common[@]}" "${exec_env[@]}" "${torch_cpu[@]}" "${torch_gpu[@]}" )
42+
export ALL_SERVICES=( "${mini[@]}" "${common[@]}" "${exec_env[@]}" "${torch_cpu[@]}" "${torch_cuda[@]}" )

0 commit comments

Comments
 (0)