Giter VIP home page Giter VIP logo

deeplearning_gpu_singularity's Introduction

https://www.singularity-hub.org/static/img/hosted-singularity--hub-%23e32929.svg

A deep learning singularity container

Aim

  • Quickly set up medial imaging deep learning research environment on Linux(singularity container based)

  • GPU acceleration (CUDA and cuDNN included)

  • Supported frameworks and packages:

Pre-requisite

  • your host system must has an NVIDIA GPU card and a driver installed(you don't need to install cuda and cudnn)

  • install singularity on your host

    # ubuntu
    sudo apt-get install -y singularity-container
  • pull singularity image from singularity hub

    singularity pull --name deeplearning_gpu.simg shub://yinglilu/deeplearning_gpu_singularity:1.0.0

Usage

1. enter into singularity container, run command in the container

# enter into singularityh container: imagine it as SSH into (passwordless) another machine
# --nv: leverage the nvidia gpu card
singularity shell --nv /containers/deeplearning_gpu.simg

You will get:

Singularity: Invoking an interactive shell within container...

Singularity deeplearning_gpu.simg:~>

You can type command now, for instance:

python /path/to/<your_script.py>

After finishing your work, type

exit

to exit the container.

note: /path/to/

  • Singularity will bind your host's $HOME to container's $HOME automatically. That's mean, if you do modification on your host's home directory, you can see the modifications in the container's home directory, and vice versa.

  • If current working directory is in your home directory or bind path, Singularity will replicate your current working directory within the container.

    Therefore, /path/to/ can be a relative path or absolute path of your home or bind path.

2. run singularity container command directly

singularity exec --nv deeplearning_gpu.simg python /path/to/<your_script.py>

example: run NiftyNet command

singularity exec --nv deeplearning_gpu.simg net_download dense_vnet_abdominal_ct_model_zoo

singularity exec --nv deeplearning_gpu.simg net_segment inference -c ~/niftynet/extensions/dense_vnet_abdominal_ct/config.ini

# The segmentation output of this example application should be located at
~/niftynet/models/dense_vnet_abdominal_ct/segmentation_output/100__niftynet_out.nii.gz

build your own singularity image

sudo singularity build deeplearning_gpu.simg Singularity

test

bash test.sh

deeplearning_gpu_singularity's People

Contributors

yinglilu avatar

Stargazers

 avatar  avatar

Watchers

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