-
Notifications
You must be signed in to change notification settings - Fork 978
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 #1 from EleutherAI/sid_dev
Simplify, add ssh kube scripts, remove BERT stuff
- Loading branch information
Showing
78 changed files
with
303 additions
and
9,384 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# replace 'sid' in .yaml files with some unique name | ||
|
||
kubectl apply -f sshd-root-pvc.yaml | ||
kubectl apply -f sshd-data-pvc.yaml | ||
kubectl apply -f sshd-service.yaml | ||
kubectl apply -f sshd-deployment.yaml | ||
|
||
echo "getting pod id" | ||
|
||
kubectl get pods | ||
|
||
echo "run 'kubectl logs -f <pod ID> init' to get root pw" | ||
echo "then 'kubectl get service' to get the SSH service external IP" |
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 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: sshd-data-pv-claim-sid | ||
spec: | ||
# Available storage classes at time of writing are | ||
# ceph-ssd-2-replica - SSD Backed Storage with 2 Replicas | ||
# ceph-hdd-2-replica - HDD Backed Storage with 2 Replicas | ||
storageClassName: ceph-hdd-2-replica | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 500Gi |
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,136 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: sshd-sid | ||
spec: | ||
strategy: | ||
type: Recreate | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: sshd | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: sshd | ||
spec: | ||
terminationGracePeriodSeconds: 10 | ||
initContainers: | ||
- name: init | ||
image: atlanticcrypto/cuda-ssh-server:10.2-cudnn | ||
command: ["/bin/bash"] | ||
args: ["-c", "if [ ! -f /target/initialized ]; then | ||
password=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo ''); | ||
echo \"root:$password\" | chpasswd; | ||
echo \"Root password is: $password\"; | ||
sed -i -e 's/archive.ubuntu.com/mirror.deace.id/' /etc/apt/sources.list; | ||
echo 'Acquire::http::Proxy \"http:https://10.134.98.2:3128\";' > /etc/apt/apt.conf.d/proxy.conf; | ||
cp -ax / /target; | ||
echo 'Initialization complete'; | ||
touch /target/initialized; | ||
fi"] | ||
resources: | ||
requests: | ||
cpu: 1 | ||
memory: 1Gi | ||
volumeMounts: | ||
- name: root-storage | ||
mountPath: /target | ||
|
||
containers: | ||
- name: sshd-sid | ||
command: ["/usr/sbin/sshd"] | ||
args: ["-D"] | ||
tty: true | ||
image: atlanticcrypto/cuda-ssh-server:10.2-cudnn | ||
ports: | ||
- name: ssh-sid | ||
containerPort: 22 | ||
protocol: TCP | ||
volumeMounts: | ||
- name: data-storage | ||
mountPath: /mnt/data | ||
- name: root-storage | ||
mountPath: /bin | ||
subPath: bin | ||
- name: root-storage | ||
mountPath: /boot | ||
subPath: boot | ||
- name: root-storage | ||
mountPath: /etc | ||
subPath: etc | ||
- name: root-storage | ||
mountPath: /home | ||
subPath: home | ||
- name: root-storage | ||
mountPath: /lib | ||
subPath: lib | ||
- name: root-storage | ||
mountPath: /lib64 | ||
subPath: lib64 | ||
- name: root-storage | ||
mountPath: /opt | ||
subPath: opt | ||
- name: root-storage | ||
mountPath: /root | ||
subPath: root | ||
- name: root-storage | ||
mountPath: /sbin | ||
subPath: sbin | ||
- name: root-storage | ||
mountPath: /srv | ||
subPath: srv | ||
- name: root-storage | ||
mountPath: /usr | ||
subPath: usr | ||
- name: root-storage | ||
mountPath: /var | ||
subPath: var | ||
- name: run-lock | ||
mountPath: /run/lock | ||
- mountPath: /dev/shm | ||
name: dshm | ||
|
||
resources: | ||
requests: | ||
cpu: 30 # The CPU unit is mili-cores. 500m is 0.5 cores | ||
memory: 40Gi | ||
limits: | ||
nvidia.com/gpu: 8 | ||
# GPUs can only be allocated as a limit, which both reserves and limits the number of GPUs the Pod will have access to | ||
# Making individual Pods resource light is advantageous for bin-packing. Since this Pod is for general purpose interactive testing | ||
# we allocate 6 GPUs to it | ||
|
||
# Node affinity can be used to require / prefer the Pods to be scheduled on a node with a specific hardware type | ||
# No affinity allows scheduling on all hardware types that can fulfill the resource request. | ||
# In this example, without affinity, any NVIDIA GPU would be allowed to run the Pod. | ||
# Read more about affinity at: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity | ||
affinity: | ||
nodeAffinity: | ||
# This will REQUIRE the Pod to be run on a system with a Pascal GPU | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: gpu.nvidia.com/model | ||
operator: In | ||
values: | ||
- GeForce_RTX_2080_Ti | ||
- key: failure-domain.beta.kubernetes.io/region | ||
operator: In | ||
values: | ||
- ORD1 | ||
|
||
volumes: | ||
- name: root-storage | ||
persistentVolumeClaim: | ||
claimName: sshd-root-pv-claim-sid | ||
- name: data-storage | ||
persistentVolumeClaim: | ||
claimName: sshd-data-pv-claim-sid | ||
- name: run-lock | ||
emptyDir: | ||
medium: Memory | ||
- name: dshm | ||
emptyDir: | ||
medium: Memory | ||
restartPolicy: Always |
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,16 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: sshd-root-pv-claim-sid | ||
spec: | ||
# Available storage classes at time of writing are | ||
# ceph-ssd-2-replica - SSD Backed Storage with 2 Replicas | ||
# ceph-ssd-no-replica - SSD Backed Storage with 1 Replica (unsafe) | ||
# ceph-hdd-2-replica - HDD Backed Storage with 2 Replicas | ||
# ceph-hdd-no-replica - HDD Backed Storage with 1 Replicas (unsafe) | ||
storageClassName: ceph-ssd-2-replica | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 200Gi |
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,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
metallb.universe.tf/address-pool: public-ord1 | ||
# Setting a sharing key might save public IP addresses | ||
# See https://metallb.universe.tf/usage/#ip-address-sharing for more detail | ||
metallb.universe.tf/allow-shared-ip: example-1 | ||
name: sshd-sid | ||
spec: | ||
type: LoadBalancer | ||
externalTrafficPolicy: Local | ||
ports: | ||
- name: ssh-sid | ||
port: 22 | ||
protocol: TCP | ||
targetPort: ssh-sid | ||
selector: | ||
app.kubernetes.io/name: sshd |
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
Oops, something went wrong.