Skip to content

AugustusHsu/Docker-DL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

 
 
 

Contributors