GithubHelp home page GithubHelp logo

docker-dl's Introduction

XRDP+Anaconda+Deep Learning in Docker

For the requirement of my lab, I use ubuntu and XRDP to build a virtual environment that can use GUI on it. And also I need to assign GPU resources to different people. I follow the tutorial from Nvidia Docker to build the docker, so I can assign GPU to the different user. Also, I use Anaconda to manager my python packages.

Build or Pull

Build

sudo docker build -t image_name:tag \
--build-arg USERNAME=username \
--build-arg USERPWD=yourpassword .

You can change the USERNAME and USERPWD by yourself. Or use the default setting on this image.

Pull

docker pull augustushsu/ubuntu18.04-xrdp:cuda10.0-cudnn7-anaconda

Use this command to download the image from Docker Hub.

Run

sudo docker run --gpus device=1 -it \
-p 33890:3389 \
-v /mnt/SSD:/data/SSD \
-v /mnt/HDD:/data/HDD \
-v /docker_config/config:/config \
image_name:tag

--gpus device:Chose your GPU device. Or use all.

-p:This is port number on your host to container. host port : container port

-v:For the directory of your host to the container. host directory : container port

For the default: USERNAME is username USERPWD is yourpassword

Before login, you need to use this command to start the xrdp service.

service xrdp restart

Test

You can find the script on the username home directory named tf2.sh and test_tf.py.

tf2.sh can create the tf2 enviroment and install Tensorflow2.0.

test_tf.py is a simple neural network on the Tensorflow website. Let you can simply test the environment.

My Blog

You can find the detail on my Blog, but it is used in Chinese.

https://augustushsu.github.io/2019/12/23/DeepLearning-03/#more

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.