Skip to content

Commit

Permalink
Changes based on bootcamp feedback (#36)
Browse files Browse the repository at this point in the history
* fix: remove comments from code blocks

* fix: gpu machineset name pattern to match instructions
  • Loading branch information
hemang-rh authored Dec 4, 2024
1 parent fecafe2 commit 98338f9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
2 changes: 0 additions & 2 deletions docs/00-prerequisite.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
- [ ] Git clone this repository

```sh
# git clone repo
git clone https://github.com/redhat-na-ssa/hobbyist-guide-to-rhoai.git

# change into the repo directory
cd hobbyist-guide-to-rhoai
```

Expand Down
1 change: 0 additions & 1 deletion docs/01-add-administrative-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ For this bootcamp, we are using HTpasswd as the Identity Provider (IdP). To lear
- [ ] Create an htpasswd using a container on OpenShift

# using oc to create htpasswd
oc run \
--image httpd \
-q --rm -i minion -- /bin/sh -c 'sleep 2; htpasswd -n -b -B -C10 <username> <password>' > scratch/users.htpasswd
Expand Down
11 changes: 4 additions & 7 deletions docs/02-enable-gpu-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@
- [ ] Make a copy of one of the existing compute MachineSet definitions and output the result to a YAML file

# get your machineset name --no-headers removes the headers from the output. awk '{print $1}'. extracts the first column.
# head -n 1 limits the output to the first entry.
> `--no-headers removes the headers from the output.`
> `awk '{print $1}'. extracts the first column.`
> `head -n 1 limits the output to the first entry.`
MACHINESET_COPY=$(oc get machinesets -n openshift-machine-api --no-headers | awk '{print $1}' | head -n 1)

# make a copy of an existing machineset definition
oc get machineset $MACHINESET_COPY -n openshift-machine-api -o yaml > scratch/machineset.yaml

- [ ] Edit the downloaded machineset.yaml and update the following fields:
Expand Down Expand Up @@ -155,7 +156,6 @@
- [ ] Verify the operator is installed and running

# watch the pods get created in the new project
oc get pods -n openshift-nfd -w

> Expected output
Expand Down Expand Up @@ -281,7 +281,6 @@ Below are some of the [PCI vendor ID assignments](https://pcisig.com/membership/
- [ ] Verify an install plan has been created. Be patient.

# you can watch the installplan instances get created
oc get installplan -n nvidia-gpu-operator -w

> Expected output
Expand Down Expand Up @@ -365,10 +364,8 @@ Below are some of the [PCI vendor ID assignments](https://pcisig.com/membership/
- [ ] Apply this label to new machines/nodes:

# set an env value
MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep gpu | head -n1)

# patch the machineset
oc -n openshift-machine-api \
patch "${MACHINE_SET_TYPE}" \
--type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"node-role.kubernetes.io/gpu":""}}}}}}'
Expand Down
2 changes: 0 additions & 2 deletions docs/09-configure-distributed-workloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ In this example, the kueue.x-k8s.io/default-queue: "true" annotation defines thi

- [ ] Apply the configuration to create the local-queue object

# go to sandbox
oc project sandbox || oc new-project sandbox

# create local queue
oc apply -f configs/09/rhoai-kueue-local-queue.yaml

> Expected output
Expand Down
4 changes: 3 additions & 1 deletion scripts/library/ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,10 @@ ocp_aws_create_gpu_machineset(){
# 8 x gaudi: dl1.24xlarge

INSTANCE_TYPE=${1:-g4dn.4xlarge}
GPU_INSTANCE_NAME=${2:-cluster-${INSTANCE_TYPE/./-}-gpu}

ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}"
echo "Creating machineset: ${INSTANCE_TYPE} as ${GPU_INSTANCE_NAME}"
ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}" "${GPU_INSTANCE_NAME}"

MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1)

Expand Down

0 comments on commit 98338f9

Please sign in to comment.