Skip to content

Instantly share code, notes, and snippets.

View blues-man's full-sized avatar
😎

Natale Vinto blues-man

😎
View GitHub Profile
pip install huggingface-cli
mkdir models && cd models
huggingface-cli download ibm-granite/granite-3.2-8b-instruct --local-dir granite-32-8b-instruct
ls -l granite-32-8b-instruct
oc project ic-shared-minio
MINIO_API="https://$(oc get route minio -o jsonpath='{.spec.host}')"
B64_USER=$(kubectl get secret minio-keys -o jsonpath='{.data.minio_root_user}')
MINIO_USER=$(echo $B64_USER | base64 --decode)
echo "user:$B64_USER is decoded as $MINIO_USER"
B64_PASSWORD=$(kubectl get secret minio-keys -o jsonpath='{.data.minio_root_password}' -n ic-shared-minio)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vllm-models
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
@blues-man
blues-man / Containerfile
Created September 26, 2024 21:05
Containerfile for UBI9 with .NET 8.0
FROM registry.access.redhat.com/ubi9-minimal:9.4
LABEL org.opencontainers.image.authors="[email protected]"
USER 0
RUN useradd dotnet -m -d /home/dotnet -s /sbin/nologin \
&& mkdir -p /app \
&& chown -R dotnet /app \
&& microdnf update -y \
&& microdnf install -y dotnet-sdk-8.0 \
<p>
Do you need to familiarize yourself with cloud-native development, Kubernetes automation, and GitOps methodology?
In this lab, we'll walk you through a complete development journey example of a 2-tier application made with Python and Go, built and deployed on Red Hat OpenShift.
The full lab introduction can be found <a href="https://redhat-scholars.github.io/inner-outer-guides">here</a>.
You'll learn how to:
</p>
<ul>
<li>Create container images with Red Hat OpenShift Pipelines and use webhooks to trigger automated builds.</li>
<li>Work with Red Hat OpenShift Dev Spaces for an integrated development experience in the browser.</li>
<li>Deploy and promote the application into several environments using Red Hat OpenShift GitOps.</li>
PATH=$PATH:/home/user/bin
mkdir ~/bin
curl -L https://github.com/blues-man/kustomize-workaround/raw/main/kustomize -o ~/bin/kustomize
chmod +x ~/bin/kustomize
sh
schemaVersion: 2.1.0
metadata:
generateName: ${{values.artifact_id}}
icon: https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg
tags: [ 'Java', 'Quarkus']
projectType: Quarkus
language: Java
attributes:
controller.devfile.io/storage-type: ephemeral
components:
#!/bin/bash
# Project
oc new-project workshop
# Parksmap
oc policy add-role-to-user view -z default
oc new-app quay.io/openshiftroadshow/parksmap:latest --name=parksmap -l 'app=workshop,component=parksmap,role=frontend,app.kubernetes.io/part-of=workshop'
oc create route edge parksmap --service=parksmap
# Nationalparks
oc new-app java:openjdk-11-ubi8~https://github.com/openshift-roadshow/nationalparks.git --name nationalparks -l 'app=workshop,component=nationalparks,role=backend,app.kubernetes.io/part-of=workshop,app.kubernetes.io/name=java' --allow-missing-images=true
oc expose svc nationalparks
@blues-man
blues-man / workshop_debug_4.10.sh
Last active February 4, 2022 17:17
Script to deploy the whole Getting Started with OpenShift 4.10 for Developers workshop
# Project
oc new-project workshop
# Permissions for Service Account and Fabric8 Kubernetes client
oc policy add-role-to-user view -z default
# Parksmap
oc new-app quay.io/openshiftroadshow/parksmap:latest --name=parksmap -l 'app=workshop,component=parksmap,role=frontend,app.kubernetes.io/part-of=workshop'
oc create route edge parksmap --service=parksmap
@blues-man
blues-man / kataklisma.py
Created November 30, 2021 16:59
Converter from Katacoda to Instruqt, it expects the katacoda content present in learn-katacoda dir. It expects track_scripts and config.yml templates present in the same level.
#!/usr/bin/python
# Katacoda to Instruqt converter
# v. 0.0.3
# Support for notes in first challenge, fix NodePort
#
# v. 0.0.2
# Support for bulk migrate with git submodule
@blues-man
blues-man / workshop_debug_4.8.sh
Last active February 2, 2022 16:12
Script to deploy the whole Getting Started with OpenShift 4.8 for Developers workshop
#!/bin/bash
# Project
oc new-project workshop
# Parksmap
oc policy add-role-to-user view -z default
oc new-app quay.io/openshiftroadshow/parksmap:latest --name=parksmap -l 'app=workshop,component=parksmap,role=frontend,app.kubernetes.io/part-of=workshop'
oc create route edge parksmap --service=parksmap
# Nationalparks
oc new-app java:openjdk-11-ubi8~https://github.com/openshift-roadshow/nationalparks.git --name nationalparks -l 'app=workshop,component=nationalparks,role=backend,app.kubernetes.io/part-of=workshop,app.kubernetes.io/name=java' --allow-missing-images=true
oc expose svc nationalparks