Skip to content

Instantly share code, notes, and snippets.

View martin-g's full-sized avatar
🏠
Working from home

Martin Grigorov martin-g

🏠
Working from home
View GitHub Profile
@martin-g
martin-g / Dockerfile.kleidiai-oe
Last active October 28, 2024 09:39
KleidiAI on openEuler
FROM openeuler/openeuler:22.03-lts-sp4
RUN dnf update -y && dnf install -y gperftools-libs git wget
RUN adduser kleidiai
USER kleidiai
WORKDIR /home/kleidiai
CREATE OR REPLACE TABLE stats AS
SELECT * FROM read_csv('./packages.tsv',
delim = '\t',
header = true,
columns = {
'package': 'VARCHAR',
'total': 'INTEGER'
})
WHERE package NOT LIKE 'bioconductor-%'
AND package NOT LIKE 'perl-%'
@martin-g
martin-g / collect-non-aarch64-recipes.sh
Created March 21, 2024 09:57
Generates a tab separated values file with all Bioconda recipe names and their aarch64/noarch status
#!/usr/bin/env bash
# set -x
RECIPES_PATH=${1:-recipes}
AARCH64_STATUS_FILE="/home/martin/git/bioconda/bioconda-stats/package-downloads/anaconda.org/bioconda/aarch64-status.tsv"
rm -f ${AARCH64_STATUS_FILE}
echo -e "package\thas-aarch64\tnoarch" > ${AARCH64_STATUS_FILE}
apiVersion: scheduling.volcano.sh/v1beta1
kind: PodGroup
spec:
minMember: 1
minResources:
cpu: "5"
memory: "7Gi"
priorityClassName: medium
queue: my-queue
@martin-g
martin-g / run-spark-pi-3.3-SNAPSHOT-on-k8s-volcano.bash
Created March 24, 2022 12:44
Bash shell script to run Spark Pi example on Volcano using PodGroup template
#!/usr/bin/env bash
K8S_NAMESPACE="spark-on-k8s"
K8S_SERVICE_ACCOUNT_NAME="spark-account-name"
K8S_CLUSTER_ROLE="spark-on-k8s-cluster-role"
CURRENT_CONTEXT=(kubectl config view -o jsonpath="{.current-context}")
K8S_MASTER=$(kubectl config view -o jsonpath="{.clusters[?(@.name==\"$CURRENT_CONTEXT\")].cluster.server}")
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
name: my-queue
spec:
weight: 1
capability:
cpu: "6"
memory: "8096Mi"
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high
value: 100
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: medium
#!/usr/bin/env bash
DRIVER_CORES=1
DRIVER_MEM=2048m
EXECUTOR_INSTANCES=3
EXECUTOR_CORES=2
EXECUTOR_MEM=2048m
SPARK_HOME="/path/to/spark-3.3.0-SNAPSHOT-bin-with-volcano" # CHANGE 1
PATH="$JAVA_8_HOME/bin:$SPARK_HOME/bin:$PATH"
#!/usr/bin/env bash
BASE_OS="openeuler/openeuler:20.03-lts-sp3"
SPARK_VERSION="3.3.0-SNAPSHOT"
SCALA_VERSION="scala_2.12"
DOCKERIMAGETAG="11-jre-slim"
cd $SPARK_HOME
./bin/docker-image-tool.sh \
-t ${SPARK_VERSION}-${SCALA_VERSION}-${DOCKERIMAGETAG} \