Editing
Tutorials:Link to container registry on our server
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Pulling images into the GPU cluster === To be able to use your customized image in our GPU cluster, first you have to verify that you have a ''secret'' configured to the CCU repository. After establishing the login with docker, you should have config.json file created in your docker directory, in an Ubuntu installation: <syntaxhighlight lang="bash"> /home/<Your_Ubuntu_Username>/.docker/config.json </syntaxhighlight> In order to create a secret using your login information, type: <syntaxhighlight lang="bash"> kubectl create secret generic <A_Name_For_Your_Secret> --from-file=.dockerconfigjson=/home/<Your_Ubuntu_Username>/.docker/config.json --type=kubernetes.io/dockerconfigjson </syntaxhighlight> You can check it succeeded by running: <syntaxhighlight lang="bash"> kubectl get secrets NAME TYPE DATA AGE <A_Name_For_Your_Secret> kubernetes.io/dockerconfigjson 1 17d </syntaxhighlight> Now, whenever you are submitting a pod or a job you should reference your secret at container level of your yaml file: <syntaxhighlight lang="bash"> apiVersion: v1 kind: Pod metadata: name: busybox-test-pod spec: containers: - name: busybox image: ccu-k8s.inf.uni-konstanz.de:32250/<your.username>/my_busybox #change busybox to whatever the name of your custom container is command: ["sleep", "1d"] resources: requests: cpu: 100m memory: 100Mi limits: cpu: 1 memory: 1Gi volumeMounts: - mountPath: /abyss/home name: cephfs-home readOnly: false - mountPath: /abyss/shared name: cephfs-shared readOnly: false - mountPath: /abyss/datasets name: cephfs-datasets readOnly: true imagePullSecrets: #Secret to your repository here - name: <A_Name_For_Your_Secret> #Name you have chosen for your secret volumes: - name: cephfs-home hostPath: path: "/cephfs/abyss/home/<your-username>" type: Directory - name: cephfs-shared hostPath: path: "/cephfs/abyss/shared" type: Directory - name: cephfs-datasets hostPath: path: "/cephfs/abyss/datasets" type: Directory </syntaxhighlight> Note: from Kubernetes, you typically only need read-only access to the registry to pull the images. For your convenience, a secret which gives read-only access to the full registry is already present in your namespace by default. The name of this secret is "registry-ro-login". If you use it, you can skip the step of generating your own secret.
Summary:
Please note that all contributions to Collective Computational Unit may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
CCU:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Collective Computational Unit
Main page
Projects
Tutorials
GPU Cluster
Core Facilitys
Mediawiki
Recent changes
Random page
Help
Tools
What links here
Related changes
Page information