This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
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.
Merge pull request #5 from QGreenland-Net/use-custom-image
Use custom image
- Loading branch information
Showing
10 changed files
with
227 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
runinfo* | ||
runinfo* | ||
src/ |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
FROM mambaorg/micromamba:1.5.8 AS micromamba | ||
|
||
USER root | ||
RUN apt update && apt install -y git | ||
USER $MAMBA_USER | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER . . | ||
|
||
RUN micromamba install --yes --name "base" --file "environment.yml" | ||
RUN micromamba clean --all --yes | ||
|
||
# ENV PATH "/opt/conda/bin:${PATH}" | ||
ENV PATH "/opt/conda/bin:${PATH}" |
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,52 @@ | ||
apiVersion: "batch/v1" | ||
kind: "Job" | ||
metadata: | ||
name: "parsl-init" | ||
spec: | ||
# TODO: when completions is 1, parallelism must be 1, but do we need to specify it? | ||
parallelism: 1 | ||
completions: 1 | ||
# TODO: Supported in k8s 1.23, but ADC has 1.22; this would be nice :) | ||
# ttlSecondsAfterFinished: 60 | ||
template: | ||
metadata: | ||
name: "parsl-init" | ||
spec: | ||
serviceAccountName: "qgnet" | ||
automountServiceAccountToken: true | ||
volumes: | ||
# This is how the Python script gets to the cluster | ||
- name: "parsl-init-script-volume" | ||
configMap: | ||
name: "parsl-init-script" | ||
# Data storage: | ||
- name: "data" | ||
persistentVolumeClaim: | ||
claimName: "qgnet-pvc-test-1" | ||
containers: | ||
- name: "parsl-init" | ||
image: "ghcr.io/qgreenland-net/parsl-exploration:v0.1.1" | ||
volumeMounts: | ||
- name: "parsl-init-script-volume" | ||
mountPath: "/parsl-init-script" | ||
- name: "data" | ||
mountPath: "/data" | ||
command: | ||
- "bash" | ||
- "-c" | ||
- "micromamba run -n base python /parsl-init-script/run.py" | ||
restartPolicy: "Never" | ||
--- | ||
apiVersion: "v1" | ||
kind: "PersistentVolumeClaim" | ||
metadata: | ||
name: "qgnet-pvc-test-1" | ||
namespace: "qgnet" | ||
spec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
volumeMode: "Filesystem" | ||
resources: | ||
requests: | ||
storage: "100Mi" | ||
storageClassName: "csi-rbd-sc" |
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,17 @@ | ||
apiVersion: "v1" | ||
kind: "Pod" | ||
metadata: | ||
name: "pvc-inspector" | ||
spec: | ||
containers: | ||
- image: "busybox" | ||
name: "pvc-inspector" | ||
command: ["tail"] | ||
args: ["-f", "/dev/null"] | ||
volumeMounts: | ||
- mountPath: "/pvc" | ||
name: "pvc-mount" | ||
volumes: | ||
- name: "pvc-mount" | ||
persistentVolumeClaim: | ||
claimName: "qgnet-pvc-test-1" |
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,38 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: qgnet | ||
namespace: qgnet | ||
|
||
--- | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: qgnet | ||
namespace: qgnet | ||
rules: | ||
- apiGroups: ["", "networking.k8s.io", "extensions", "apps","autoscaling"] | ||
#apiGroups: ["", "networking.k8s.io", "extensions", "apps","autoscaling", "rbac.authorization.k8s.io"] | ||
resources: ["*"] | ||
verbs: ["*"] | ||
- apiGroups: ["batch"] | ||
resources: | ||
- jobs | ||
- cronjobs | ||
verbs: ["*"] | ||
|
||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: qgnet | ||
namespace: qgnet | ||
subjects: | ||
- kind: ServiceAccount | ||
name: qgnet | ||
namespace: qgnet | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: qgnet |
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
Oops, something went wrong.