Giter VIP home page Giter VIP logo

chainer-docker's Introduction

chainer-docker

CircleCI

chainer-docker is a template for a typical machine learning project using chainer, docker, and docker-compose.

Requirement

  • docker >= 17.12.0
  • docker-compose >= 1.19.0
  • nvidia-docker2 >= 2.0.2

Getting start

๐Ÿ”ฐ Setup configuation

Register the required environment variables to your .bashrc:

export UID
export GID=`id -g`

Register the required environment variables to .env:

  • IMAGENAME: Name of docker image for this project (default: chainer-docker)

And set the name of this package in setup.py:

...

setup(
    name='name of package',

...

๐Ÿณ Use docker without GPU (ex. Mac OS)

Build docker image

$ docker-compose build cpu

Run docker container

You can run a command in a new container:

$ docker-compose run cpu [COMMAND]

๐Ÿณ Use docker with GPU

Build docker image

$ docker-compose build gpu

Run docker container

Check if a GPU is available in the container by running nvidia-smi:

$ docker-compose run gpu nvidia-smi

And then you can run a command in a new container:

$ docker-compose run gpu [COMMAND]

๐Ÿ“˜ Launch Jupyter Lab

Start up Jupyter Lab using:

$ docker-compose up jupyter

You will get the response as follows:

...
Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://0.0.0.0:8888/?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
...

Then you can access jupyter lab from the follwing URL:

http://0.0.0.0:8888/?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Note that you can change the port using environment variable as below:

$ PORT=9999 docker-compose up jupyter

chainer-docker's People

Contributors

k-fujikawa avatar

Watchers

 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.