Skip to content

Instantly share code, notes, and snippets.

@ankane
Last active October 29, 2020 23:23

Revisions

  1. ankane revised this gist Oct 29, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions bootstrap_ami.sh
    Original file line number Diff line number Diff line change
    @@ -13,10 +13,10 @@ cd torch.rb

    # install dependencies
    bundle install
    bundle exec rake compile -- --with-torch-dir=$HOME/libtorch
    rake compile -- --with-torch-dir=$HOME/libtorch

    # test
    bundle exec rake test
    rake test

    # run example
    bundle exec ruby examples/mnist/main.rb
  2. ankane revised this gist Oct 29, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion bootstrap_ami.sh
    Original file line number Diff line number Diff line change
    @@ -19,5 +19,4 @@ bundle exec rake compile -- --with-torch-dir=$HOME/libtorch
    bundle exec rake test

    # run example
    wget https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
    bundle exec ruby examples/mnist/main.rb
  3. ankane revised this gist Oct 29, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap_ami.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    sudo snap install ruby --classic

    # install LibTorch
    wget -O libtorch.zip https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.5.0.zip
    wget -O libtorch.zip https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.7.0.zip
    unzip libtorch.zip

    # download
  4. ankane created this gist Apr 27, 2020.
    23 changes: 23 additions & 0 deletions bootstrap_ami.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # Bootstrap AWS Deep Learning Base AMI (Ubuntu 18.04)

    # install Ruby
    sudo snap install ruby --classic

    # install LibTorch
    wget -O libtorch.zip https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.5.0.zip
    unzip libtorch.zip

    # download
    git clone https://github.com/ankane/torch.rb.git
    cd torch.rb

    # install dependencies
    bundle install
    bundle exec rake compile -- --with-torch-dir=$HOME/libtorch

    # test
    bundle exec rake test

    # run example
    wget https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
    bundle exec ruby examples/mnist/main.rb