Giter VIP home page Giter VIP logo

dockers's Introduction

Repository for dockerfiles


  1. cuda-caffe-matlab

     Ubuntu 14.04 + cuda 8.0 + cudnnv5 + caffe/matlab dependencies
    
  2. matlab-anaconda-cuda7.0-cudnn4

     Ubuntu 14.04 + cuda7.0 + cudnnv4 + matlab dependencies + anaconda
    
  3. PSPNet: based on "matlab-anaconda-cuda7.0-cudnn4"

     caffe dependencies
    
  4. MXNet for Resnet-38 segmentation [Link]

     Ubuntu 14.04 + cuda 8.0 + cudnnv5.1 + mxnet
    

Usage


Pull docker image

  1. Choose one of these [IMAGE_NAME]: cuda-caffe-matlab, matlab-anaconda-cuda7.0-cudnn4, pspnet, mxnet

     docker pull soonminh/IMAGE_NAME
    

Or Build Docker image on your machine

  1. Preparation: generate Dockerfile with name

     ./make_dockerfile.sh matlab-anaconda-cuda7.0-cudnn4
    
  2. matlab-anaconda-cuda7.0-cudnn4

     docker build -t soonminh/baseenv:mat-py-cuda7.0-cudnn4 matlab-anaconda-cuda7.0-cudnn4/
    

Run docker image

  1. To use gui interface,

    • Use follow options:

        -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
        -e DISPLAY=$DISPLAY
      
  2. To use matlab in docker container,

    • Specify several variables (modify follows depending on your MATLAB version & mac address)

        export MATLAB_ROOT=/usr/local/MATLAB/R2015b
        export MATLAB_LOGS=/home/rcvlab/matlab-logs
        export MATLAB_MAC_ADDRESS=11:22:33:44:55:66
      
    • Use follow options:

        -v "$MATLAB_ROOT":/usr/local/MATLAB/from-host \
        -v "$MATLAB_LOGS":/var/log/matlab \
        --mac-address="$MATLAB_MAC_ADDRESS"
      
    • For more details, please refer original description (ninjaben/matlab-support)

  3. Example

    • My case,

        $ export MATLAB_ROOT=/usr/local/MATLAB/R2015b
        $ export MATLAB_LOGS=/home/rcvlab/matlab-logs
        $ export MATLAB_MAC_ADDRESS=11:22:33:44:55:66
      
        $ echo 'alias caffematlabos='sudo nvidia-docker run -it -u rcvlab \
        		-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
        		-e DISPLAY=$DISPLAY \
        		-v "$MATLAB_ROOT":/usr/local/MATLAB/from-host \
        		-v "$MATLAB_LOGS":/var/log/matlab \
        		--mac-address="$MATLAB_MAC_ADDRESS" \
        		soonminh/baseenv:mat-py-cuda7.0-cudnn4' >> ~/.bashrc
      
        $ source ~/.bashrc
        $ caffematlabos
      

Tips

- Use mount in container (connect network drive)
		$ sudo nvidia-docker run -it \
		--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined $DOCKER_IMAGE_NAME

- Add your account into sudo group & set password,	
		$ sudo nvidia-docker run -it --name base -u root soonminh/baseenv:mat-py-cuda7.0-cudnn4
		$ adduser USER_NAME sudo
		$ passwd USER_NAME
		$ exit
		$ docker commit base soonminh/baseenv:mat-py-cuda7.0-cudnn4


- Deprecated (Below procedure is already done in Dockerfile),
		
		$ id (remember id number = USER_ID_NUM)
		$ sudo nvidia-docker run -it -name base -u root soonminh/baseenv:mat-py-cuda7.0-cudnn4
		$ groupadd -r USER_NAME -g USER_ID_NUM
		$ useradd -u USER_ID_NUM -g USER_NAME -m -s /bin/bash USER_NAME
		$ adduser USER_NAME sudo
		$ passwd USER_NAME
		$ docker commit base soonminh/baseenv:mat-py-cuda7.0-cudnn4

- Set alias,

		$ echo -e alias pspnetos=\"sudo nvidia-docker run -it -u ${USER_NAME} \\n
			\t -v /tmp/.X11-unix:/tmp/.X11-unix:ro \\n
			\t -e DISPLAY=$DISPLAY \\n
			\t -v $MATLAB_ROOT:/usr/local/MATLAB/from-host \\n
			\t -v $MATLAB_LOGS:/var/log/matlab \\n
			\t --mac-address=$MATLAB_MAC_ADDRESS \\n
			\t -v ~/workspace:/home/rcvlab/workspace \\n
            \t -v /mnt/HDD4TB:/mnt/HDD4TB \\n
            \t -v /media/rcvlab/New4TB:/media/rcvlab/New4TB \\n
			\t soonminh/pspnet:latest\" >> ~/.bashrc
		$ source ~/.bashrc

If you are struggling with python-unicode problem, see here

$ python -c "print(chr(0x5555))"
On a correctly configured system, it gives:
ๅ••
Else,
$ export LANG=C.UTF-8

dockers's People

Contributors

soonminhwang avatar

Watchers

James Cloos 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.