generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpu-driver helm chart configurable node-pool name
- Loading branch information
Showing
14 changed files
with
212 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: test2 | ||
spec: | ||
updateStrategy: | ||
type: OnDelete | ||
selector: | ||
matchLabels: | ||
name: test2 | ||
template: | ||
metadata: | ||
labels: | ||
name: test2 | ||
spec: | ||
priorityClassName: system-node-critical | ||
hostPID: true | ||
nodeSelector: | ||
host: test2 | ||
containers: | ||
- name: test2 | ||
image: ubuntu | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- "--" | ||
args: | ||
- "echo $NAME && sleep 864000" | ||
env: | ||
- name: NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.labels['name'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Dockerfile | ||
README.md | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3-pip python3-dev git && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Set Python3 as default | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 | ||
|
||
WORKDIR /app | ||
COPY requirements.txt /app/requirements.txt | ||
|
||
# Install PyTorch and diffusers | ||
RUN pip install --upgrade pip && \ | ||
pip install -r requirements.txt | ||
|
||
COPY ./*.py /app | ||
|
||
# Default command starts HTTP server | ||
CMD ["python3", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test | ||
spec: | ||
containers: | ||
- name: test | ||
image: ghcr.io/tmilos77/gpu-test:cuda | ||
imagePullPolicy: Always | ||
resources: | ||
limits: | ||
nvidia.com/gpu: '1' | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
========== | ||
== CUDA == | ||
========== | ||
|
||
CUDA Version 11.8.0 | ||
|
||
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
|
||
This container image and its contents are governed by the NVIDIA Deep Learning Container License. | ||
By pulling and using the container, you accept the terms and conditions of this license: | ||
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license | ||
|
||
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience. | ||
|
||
--- | ||
|
||
cuda_available: true | ||
device_count: 1 | ||
device_name: NVIDIA L4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import torch | ||
import yaml | ||
|
||
data=dict() | ||
is_available=torch.cuda.is_available() | ||
data['cuda_available']=is_available | ||
|
||
if is_available: | ||
data['device_count']=torch.cuda.device_count() | ||
data['device_name']=torch.cuda.get_device_name(0) | ||
|
||
print('---') | ||
print('') | ||
print(yaml.dump(data)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
torch | ||
pyyaml | ||
numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
kubectl apply -f k8s.yaml | ||
|
||
kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/busybox1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
IMAGE=ghcr.io/gardenlinux/gardenlinux/kmodbuild | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
TAGS=$(docker image ls $IMAGE | awk '{ print $2 }' | tail -n +2) | ||
|
||
while IFS= read -r TAG; do | ||
KERNEL=$(docker run --platform linux/amd64 --rm -v $SCRIPT_DIR/../../charts/gpu-driver/files/gardenlinux-nvidia-installer:/mnt/scripts $IMAGE:$TAG /mnt/scripts/extract_kernel_name.sh cloud) | ||
echo " $KERNEL: $TAG" | ||
done <<< "$TAGS" |