GithubHelp home page GithubHelp logo

dockerfiles's Introduction

Docker file to create image for GET training

Install docker

Instructions here: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ You may need to reboot your system after installation

Make docker start on boot:

sudo systemctl enable docker

Use docker without sudo:

sudo groupadd docker
sudo usermod -aG docker $USER

(need to log out and back in)

Install nvidia-docker

Instructions here: https://github.com/NVIDIA/nvidia-docker

For nvidia docker to work, make sure you have nvidia drivers

To check your driver versions:

cat /proc/driver/nvidia/version

To install nvidia drivers:

http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux

Create image

docker build -t <image_name> .

Docker cheatsheet

Stop / remove all containers

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Access container with jupyter

docker run -p 6006:6006 -p 8888:8888 -v /home/stuff/:/home/stuff jupyter notebook --ip 0.0.0.0 --allow-root

Find out existing images

docker images

Find out running containers

docker ps -a -f status=running

Create new image from existing one

docker commit --message "Extra python packages" <existing IMAGE ID> <new_image_name>

Run and jump to interactive seesion

docker run -it <image name>

Delete container upon exit

docker run -it --rm <image_name>

Mount local folder to docker image

docker run -it -v <path_on_local_system>:<path_on_local_image> <image name>

To run with GPU enabled:

nvidia-docker run XXX

dockerfiles's People

Watchers

 avatar  avatar  avatar

Forkers

afcarl

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.