Git Product home page Git Product logo

jerryzj-docker-service's Introduction

docker_service

Docker container as ssh server with NVIDIA GPU enabled

Package required

  • NVIDIA driver (It will be installed automatically in Ubuntu 20.04 LTS)
  • Docker v19.03.13
  • nvidia-docker2 v2.5.0-1
  • docker-compose v1.27.4

Notes

The latest nvidia-docker is integrated with docker-compose now, make sure you install the latest version of nvidia-docker and docker-compose.

To install the latest version of docker, docker-compose and nvidia-docker, make sure installing them from Docker official APT repo, Pypl, and NVIDIA APT repo respectively.

1. Build ssh enabled image

First, you need to build a ssh enabled image to launch CAAS (container as a service).

The default base image is jerry_zj/dev_basic_gpu, you can edit the Dockerfile under build_image directory to your own image.

The name of the ssh enabled image is set to dev_basic_gpu_server by default, you can name your own image by edit docker-compose.yml under build_image directory.

The default command will build CPU and GPU images simultaneously

cd build_image
docker-compose build

If you want to build image for CPU only, use

cd build_image
docker-compose build cpu

2. Use docker-compose to start a server

After the image is built, you can use the following command to start a container

In tvm_dev, we will mount your home directory to the container by default, you can specify a certain path instead.

cd tvm_dev
docker-compose up -d

3. Connect to the container

Note that using the specified port in docker-compose.yml

ssh -p$SPECIFIED_PORT root@$Hostname

jerryzj-docker-service's People

Contributors

jerryzj avatar andyhsu10 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.