Giter VIP home page Giter VIP logo

oreilly-pytorch's Introduction

oreilly-pytorch

Introductory PyTorch Tutorials

Environment Options

1. Docker container (recommended)
2. Local Machine

Option 1: Docker

CPU

docker build -t gokumd/pytorch-docker:cpu -f Dockerfile.gpu .
docker run -it --name=nlpbook --ipc=host -p 8888:8888 -p 6006:6006 gokumd/pytorch-docker:cpu

GPU

docker build -t gokumd/pytorch-docker:gpu -f Dockerfile.gpu .
nvidia-docker run -it --ipc=host -p 8888:8888 -p 6006:6006 gokumd/pytorch-docker:gpu

Setup virtualenv:

virtualenv -p python3.6 venv
source venv/bin/activate
pip install numpy==1.12.1
pip install requests==2.13.0
pip install -r requirements.txt
pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl
pip install torchvision

Option 2: Local machine

OSX:

virtualenv -p python3.5 venv
source venv/bin/activate
pip install numpy==1.12.1
pip install requests==2.13.0
pip install -r requirements.txt
pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp35-cp35m-macosx_10_7_x86_64.whl 
pip install torchvision

Linux:

virtualenv -p python3.6 venv
source venv/bin/activate
pip install numpy==1.12.1
pip install requests==2.13.0
pip install -r requirements.txt
pip install http://download.pytorch.org/whl/cu80/torch-0.1.11.post5-cp35-cp35m-linux_x86_64.whl
pip install torchvision

Conda

If you are use the Anaconda python distribution, follow these instructions to setup the docker container and then the virtual environment.

clone https://github.com/pytorch/pytorch in the root of this repo and replace the Dockerfile with our Dockerfile.conda
docker build -t gokumd/pytorch-docker-conda:cpu -f Dockerfile.conda .
docker run -it --ipc=host -p 8888:8888 -p 6006:6006 gokumd/pytorch-docker-conda:cpu
conda update conda
conda create -n venv python=3.5 anaconda
source activate venv
conda install --yes --file requirements.txt

Set Up Crayon BEFORE jupyter (Port: 8888) - https://github.com/torrvision/crayon

cd server
docker build -t crayon:latest -f Dockerfile .
docker run -d -p 8888:8888 -p 8889:8889 --name crayon crayon
Go to locahost:8888 for Tensorboard.

Start IPython/Jupyter Notebook (Port: 8889)

jupyter notebook --allow-root

Common Docker Issues

If ports are occupied:
    lsof -nP +c 15 | grep LISTEN
    sudo kill -9 <>

oreilly-pytorch's People

Contributors

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