-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprog_retrieval.yml
More file actions
68 lines (65 loc) · 2.09 KB
/
prog_retrieval.yml
File metadata and controls
68 lines (65 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
apiVersion: batch/v1
kind: Job
metadata:
name: prog-retrieval-job
namespace: kc-ai-research-lab
spec:
template:
spec:
nodeSelector:
topology.kubernetes.io/region: us-west
nautilus.io/linstor: "true" # ← ADDED BACK: needed since we have a PVC again
containers:
- name: reflexion-container
image: ghcr.io/amit502/reflexion:latest # ← Your custom image
env:
- name: REPO_PATH
value: /app/reflexion
- name: RESULTS_PATH
value: /results/prog/retrieval # ← Mount point for PVC
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: openai-secret
key: api-key
command:
- "bash"
- "-c"
args:
- |
# Clone your repository
git clone https://github.com/amit502/reflexion.git ${REPO_PATH}
cd ${REPO_PATH}
# git fetch origin main
git checkout main
pip install -r programming_runs/requirements.txt
cd programming_runs
rm -rf ./root/retrieval
# Run your project
./prog_retrieval_reflexion.sh
mkdir -p ${RESULTS_PATH}
# Copy results folder to PVC
echo "Copying results to PVC..."
cp -r ${REPO_PATH}/programming_runs/root/retrieval/ ${RESULTS_PATH}/
echo "Results saved to PVC!"
echo "Job complete!"
volumeMounts:
- name: git-repo
mountPath: /app
- name: results-volume
mountPath: /results # ← PVC mounted here
resources:
limits:
memory: 2Gi
cpu: "1"
requests:
memory: 2Gi
cpu: "1"
volumes:
- name: git-repo
emptyDir: {}
- name: results-volume
persistentVolumeClaim:
claimName: reflexion-data-pvc # ← Your PVC name
restartPolicy: Never
backoffLimit: 1