Code Monkey home page Code Monkey logo

kubernetes-setup's Introduction

Instruction of using the container cluster (Kubernetes, k8s)


Requesting access

Use this form to request access (use Accréditation=MLO).

Kubernetes basics

Please refer to this repository for your basic setup.

Running a job

There are two approaches to running pods on the container cluster:

  • Like in the Kubernetes basics, with command: [sleep, infinity], and then connecting to the pod over ssh to run an experiment
    • This can be convenient for playing around. You can temporarily spin up as many nodes as you want
    • But you pay GPU time you don't use.
  • Use something like command: [run, my, experiment].
    • This makes debugging slightly harder, but as soon as your job finishes, the pod gets status Completed, and you (Martin) will stop paying for the pod.

Storage across icclusters (mounting /mlo-container-scratch)

Follow the instructions in Kubernetes basics, and use

volumeMounts:
- mountPath: /scratch
   name: mlo-scratch
   subPath: YOUR_USERNAME

and

volumes:
- name: mlo-scratch
   persistentVolumeClaim:
   claimName: mlo-scratch

Storage across icclusters (mounting /mlodata1)

spec:
  volumes:
  - name: mlodata1
    persistentVolumeClaim:
      claimName: pv-mlodata1
  containers:
  - name:  ubuntu
    volumeMounts:
    - mountPath: /mlodata1
      name: mlodata1

Custom your own docker image

Go to https://ic-registry.epfl.ch and use your gaspar to login in.

There already has a group project named mlo. Please ask the owner of the group project to give you the corresponding permission so that you can push your docker image to that repository.

Once you get the image and have the permission, you can push to the remote host, e.g.,

docker push ic-registry.epfl.ch/mlo/ml:1.0

Some deployment template

You can find some provided templates, e.g.,

Some Tips

  • By default, a Docker container will run as root. This means that the files you write in the shared storage are owned by root. You can solve this by changing the default user in Docker (example from Tao)
  • To avoid the error sudo: no tty present and no askpass program specified, please use sudo -S xxx.

kubernetes-setup's People

Contributors

tlin-taolin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.