Giter Site home page Giter Site logo

create_cuda_containers's Introduction

Install docker and nvidia-container-toolkit

Install nvidia-container-toolkit according to the installation guide

sudo apt-get install nvidia-docker2

sudo usermod -aG docker kangjie

restart your terminal

Build image

docker pull nvidia/cuda:11.2.1-cudnn8-devel-ubuntu20.04 or other images

vim Dockerfile

docker build -t kangjie/contianer_image:cuda11.2.1-cudnn8-devel-ubuntu20.04 .

Download Miniconda

cd init_files/

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Create a new container

sudo ./create_containers.sh

Add a user for the container

inside the container

docker exec -it container_name /bin/bash

cd /home/user_name/

sudo bash add_user.sh

exit

outside the container, test for the create user with the specific port

ssh user_name@ip -p port

bash Miniconda.sh

exit

login without password

inside the local machine

scp -P 32869 ~/.ssh/id_rsa.pub [email protected]:~/

# ~/.ssh/config
Host  server6kangjie
    HostName   155.69.148.30
    Port       32869
    User       kangjie
    IdentityFile    ~/.ssh/id_rsa

inside the container

mkdir ~/.ssh/

cat id_rsa.pub >> .ssh/authorized_keys

Check config for a container

check container first and remeber the container ID

docker ps

stop docker service

sudo systemctl stop docker

check config file for the container

sudo ls /var/lib/docker/containers/

sudo vim /var/lib/docker/containers/container-id/config.v2.json

start docker service

sudo systemctl start docker

create_cuda_containers's People

Contributors

kangjie-chen 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.