Giter Club home page Giter Club logo

pytorch-arm-docker's Introduction

pytorch-arm-docker

This is the git repo with instructions on how to build a docker image with pytorch / vision for arm64 devices with python2.7 and without CUDA (for now).

Setup

Docker

Full version information:

Client: Docker Engine - Community
 Version:           19.03.2
 API version:       1.40
 Go version:        go1.12.8
 Git commit:        6a30dfc
 Built:             Thu Aug 29 05:26:49 2019
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.2
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.8
  Git commit:       6a30dfc
  Built:            Thu Aug 29 05:32:21 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
  • Enable experimental features for docker

Once you have your docker installed, enable experimental features following this instructions:

cd ~/.docker/
nano config.json

Then, change experimental to "enabled".

{
  "stackOrchestrator" : "swarm",
  "auths" : {
    "https://index.docker.io/v1/" : {

    }
  },
  "experimental" : "enabled",
  "credsStore" : "desktop",
  "HttpHeaders" : {
    "User-Agent" : "Docker-Client/19.03.2 (darwin)"
  }
}

This should enable the "buildx" feature, which is currently an experimental feature.

  • Allow docker to use more memory / cpu power

Since we are going to be building torch from source, it requires lots of memory and computational power. Thus, to avoid crashes while building, which may take more than 10 hours, you should allow docker to use maximal amount of memory as well as cpu power.

Instructions for adding memory / cpu for docker desktop: https://stackoverflow.com/a/56583203

Building images

  • Build an image with pytorch
cd python27-arm64-torch-nocuda
docker buildx build --platform linux/arm64 . --tag=python27-arm64-torch-nocuda 
  • Build another image on top of the image build on 1) with torchvision
cd ../python27-arm64-torchvision-nocuda
docker buildx build --platform linux/arm64 . --tag=python27-arm64-torchvision-nocuda 

pytorch-arm-docker's People

Contributors

njw0709 avatar

Watchers

 avatar  avatar

Forkers

trellixvulnteam

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.