-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathrun
More file actions
executable file
·40 lines (32 loc) · 1.27 KB
/
run
File metadata and controls
executable file
·40 lines (32 loc) · 1.27 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
#!/bin/bash
set -e
uuid=$(uuidgen | tr '[:upper:]' '[:lower:]' | awk -F- '{print $1}')
IMAGE=$(ibmcloud cr images | grep "ce--fleet-inferencing" | awk '{print $1}')
if [ -z "${IMAGE}" ]; then
echo "no image found. pls build a inferencing image with ./build"
exit -1
fi
# getting the automatically created registry secret, e.g. ce-auto-icr-private-<region>
REGION=$(ibmcloud target -o json | jq -r '.region.name')
REGISTRY_SECRET_NAME="ce-auto-icr-private-$REGION"
PRIVATE_IMAGE="private.$IMAGE"
echo ibmcloud code-engine beta fleet create --name "fleet-${uuid}-1"
echo " "--image $PRIVATE_IMAGE
echo " "--registry-secret $REGISTRY_SECRET_NAME
echo " "--max-scale 1
echo " "--tasks-from-local-file commands.jsonl
echo " "--gpu l40s:1
echo " "--cpu 24
echo " "--memory 120G
echo " "--mount-data-store /input=fleet-input-store:/inferencing
echo " "--mount-data-store /output=fleet-output-store:/inferencing
ibmcloud code-engine beta fleet create --name "fleet-${uuid}-1" \
--image $PRIVATE_IMAGE \
--registry-secret $REGISTRY_SECRET_NAME \
--max-scale 1 \
--tasks-from-local-file commands.jsonl \
--gpu l40s:1 \
--memory 120G \
--tasks-state-store fleet-task-store \
--mount-data-store /input=fleet-input-store:/inferencing \
--mount-data-store /output=fleet-output-store:/inferencing