Skip to content

Commit 0eaff83

Browse files
committed
hack around diskspace problem in CI when using real pytorch jobs
1 parent 2cbc683 commit 0eaff83

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

hack/e2e-util.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ DUMP_LOGS="true"
2727
# Pull and kind load to avoid long delays during testing
2828
export IMAGE_ECHOSERVER="quay.io/project-codeflare/echo-server:1.0"
2929
export IMAGE_BUSY_BOX_LATEST="quay.io/project-codeflare/busybox:latest"
30-
export IMAGE_PYTORCH_SAMPLE="docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727"
3130

3231
function update_test_host {
3332

@@ -115,7 +114,7 @@ function check_prerequisites {
115114
}
116115

117116
function pull_images {
118-
for image in ${IMAGE_ECHOSERVER} ${IMAGE_BUSY_BOX_LATEST} ${IMAGE_PYTORCH_SAMPLE}
117+
for image in ${IMAGE_ECHOSERVER} ${IMAGE_BUSY_BOX_LATEST}
119118
do
120119
docker pull $image
121120
if [ $? -ne 0 ]
@@ -138,7 +137,7 @@ function kind_up_cluster {
138137
fi
139138
CLUSTER_STARTED="true"
140139

141-
for image in ${IMAGE_ECHOSERVER} ${IMAGE_BUSY_BOX_LATEST} ${IMAGE_PYTORCH_SAMPLE}
140+
for image in ${IMAGE_ECHOSERVER} ${IMAGE_BUSY_BOX_LATEST}
142141
do
143142
kind load docker-image ${image} ${CLUSTER_CONTEXT}
144143
if [ $? -ne 0 ]

test/e2e/fixtures_test.go

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ func batchjob(milliCPU int64) workloadv1beta2.AppWrapperComponent {
209209
}
210210
}
211211

212+
// Using busybox is a hack to avoid pulling a massive pytorch image onto the GitHub runner.
213+
// To test the AppWrapper side of things, we don't actually care what the containers are doing
212214
const pytorchYAML = `
213215
apiVersion: "kubeflow.org/v1"
214216
kind: PyTorchJob
@@ -223,31 +225,25 @@ spec:
223225
spec:
224226
terminationGracePeriodSeconds: 0
225227
containers:
226-
- name: pytorch
227-
image: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727
228-
command:
229-
- "python3"
230-
- "/opt/pytorch-mnist/mnist.py"
231-
- "--epochs=1"
232-
resources:
233-
requests:
234-
cpu: %v
228+
- name: busybox
229+
image: quay.io/project-codeflare/busybox:1.36
230+
command: ["sh", "-c", "sleep 120"]
231+
resources:
232+
requests:
233+
cpu: %v
235234
Worker:
236235
replicas: %v
237236
restartPolicy: OnFailure
238237
template:
239238
spec:
240239
terminationGracePeriodSeconds: 0
241240
containers:
242-
- name: pytorch
243-
image: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727
244-
command:
245-
- "python3"
246-
- "/opt/pytorch-mnist/mnist.py"
247-
- "--epochs=1"
248-
resources:
249-
requests:
250-
cpu: %v
241+
- name: busybox
242+
image: quay.io/project-codeflare/busybox:1.36
243+
command: ["sh", "-c", "sleep 120"]
244+
resources:
245+
requests:
246+
cpu: %v
251247
`
252248

253249
func pytorchjob(replicasMaster int, milliCPUMaster int64, replicasWorker int, milliCPUWorker int64) workloadv1beta2.AppWrapperComponent {

0 commit comments

Comments
 (0)