Skip to content

Commit

Permalink
gpu now part of core setup
Browse files Browse the repository at this point in the history
  • Loading branch information
julienchastang committed Nov 14, 2024
1 parent 778b630 commit 870556a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 48 deletions.
16 changes: 2 additions & 14 deletions .org/openstack/readme.org
Original file line number Diff line number Diff line change
Expand Up @@ -950,21 +950,9 @@ You'll want to keep the master node security patched as it will have a publicly
:CUSTOM_ID: h-7062BF9B
:END:

In order to build a GPU enabled cluster, [[https://www.zonca.dev/posts/2023-01-23-kubernetes-gpu-jetstream2][refer to Andrea's documentation]]. ~jupyterhub.sh~ takes ~-g~ flag to help facilate this option.
In order to build a GPU enabled cluster, [[https://www.zonca.dev/posts/2024-02-09-kubernetes-gpu-jetstream2][refer to Andrea's documentation]].

There is an image you will need to pull:

#+begin_src sh :eval no
docker pull unidata/science-gateway-gpu
#+end_src

or build with:

#+begin_src sh :eval no
docker build -t unidata/science-gateway-gpu -f Dockerfile.gpu .
#+end_src

Pay special attention to the ~cluster.tfvars~ to select VMs that have GPU hardware.
Also, pay special attention to the ~cluster.tfvars~ to select VMs that have GPU hardware.

* Appendix
:PROPERTIES:
Expand Down
8 changes: 1 addition & 7 deletions openstack/jupyterhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function usage()
echo -e "\t-n, --name JupyterHub name"
echo -e "\t-p, --ip JupyterHub IP"
echo -e "\t-o, --openrc openrc.sh path"
echo -e "\t-g, --gpu"
exit 1
}

Expand All @@ -34,10 +33,6 @@ do
OPENRC="$2"
shift # past argument
;;
-g|--gpu)
GPU="$1"
shift # past argument
;;
-h|--help)
usage
exit
Expand Down Expand Up @@ -80,5 +75,4 @@ fi
-i ${dir}/jhubs/${JUPYTERHUB}/${JUPYTERHUB} \
-p ${IP} \
-m ${dir}/jhubs/${JUPYTERHUB}/helm \
-c ${dir}/jhubs/${JUPYTERHUB}/secrets.yaml \
$GPU
-c ${dir}/jhubs/${JUPYTERHUB}/secrets.yaml
16 changes: 2 additions & 14 deletions openstack/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -929,21 +929,9 @@ reboot -h now

### GPU Enabled Clusters

In order to build a GPU enabled cluster, [refer to Andrea's documentation](https://www.zonca.dev/posts/2023-01-23-kubernetes-gpu-jetstream2). `jupyterhub.sh` takes `-g` flag to help facilate this option.
In order to build a GPU enabled cluster, [refer to Andrea's documentation](https://www.zonca.dev/posts/2024-02-09-kubernetes-gpu-jetstream2).

There is an image you will need to pull:

```sh
docker pull unidata/science-gateway-gpu
```

or build with:

```sh
docker build -t unidata/science-gateway-gpu -f Dockerfile.gpu .
```

Pay special attention to the `cluster.tfvars` to select VMs that have GPU hardware.
Also, pay special attention to the `cluster.tfvars` to select VMs that have GPU hardware.


<a id="h-78283D4A"></a>
Expand Down
14 changes: 1 addition & 13 deletions openstack/z2j.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function usage()
echo -e "\t-p, --ip cluster ip"
echo -e "\t-m, --helm full path to helm directory"
echo -e "\t-c, --secrets.yaml full path"
echo -e "\t-g, --gpu"
exit 1
}

Expand Down Expand Up @@ -59,10 +58,6 @@ do
SECRETS="$2"
shift # past argument
;;
-g|--gpu)
GPU="$1"
shift # past argument
;;
-h|--help)
usage
exit
Expand Down Expand Up @@ -135,13 +130,6 @@ if [ -z "$SECRETS" ];
exit 1
fi

if [ -z "$GPU" ];
then
IMAGE="unidata/science-gateway"
else
IMAGE="unidata/science-gateway-gpu"
fi

mkdir -p $KUBE
mkdir -p $NOVACLIENT
mkdir -p $TERRAFORM
Expand All @@ -161,4 +149,4 @@ docker run -it --name ${INVENTORY} \
-v ${SECRETS}:/home/openstack/jupyterhub-deploy-kubernetes-jetstream/secrets.yaml \
-e CLUSTER=${INVENTORY} \
-e IP=${IP} \
${IMAGE} /bin/bash
unidata/science-gateway /bin/bash

0 comments on commit 870556a

Please sign in to comment.