-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from zacsketches/master
New tutorial for using Mocha in the cloud
- Loading branch information
Showing
17 changed files
with
460 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ src/cuda/kernels/* | |
*~ | ||
\#*\# | ||
.\#* | ||
|
||
*.DS* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Mocha in the Cloud | ||
|
||
The real power of developing deep learning networks is only realized | ||
when you can test your ideas and run your models on powerful compute | ||
platforms that complete training in a fraction of the time it took only | ||
a few years ago. Today, state-of-the-art machine learning algorithms | ||
routinely run on cloud based compute that offers access to cutting edge | ||
GPU technology for a tiny cost compared to buying the GPU hardware and | ||
running it in your personal or company servers. | ||
|
||
Amazon Web Services (AWS) is one of the most popular cloud based | ||
services that provide access to such powerful computers. As Mocha and | ||
Julia mature I'm sure that a pre-configured Amazon Machine Image (AMI) | ||
will emerge to run Mocha in the cloud. Now, in October 2016, such an AMI | ||
does not exist, but even when a pre-configured image for Mocha does | ||
become available I highly recommend following through this tutorial at | ||
least once so you understand how cloud resources are provisioned and | ||
configured to suport Deep Learning. | ||
|
||
We are going to show you how to take the CIFAR-10 example and get it | ||
running in the cloud. Along the way you will learn how to interact with | ||
AWS and get a broader understanding of cloud architectures in general. | ||
|
||
The example includes several images and code snapshots. So it is best | ||
to follow along with the [documentation](http://mochajl.readthedocs.io/en/latest/tutorial/cloud.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../cifar10/cifar10.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../cifar10/convert.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../cifar10/get-cifar10.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
This script for yum based linux is a draft and has not been thoroughly tested | ||
============================================================================= | ||
|
||
Build from scratch in yum based AMIs | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: bash | ||
#! /bin/bash | ||
# Install build environment | ||
# The sed instruction allows the Extended Packages For | ||
# Enterprise Linux (epel) repository to get added to the yum package | ||
# manager. sed -i option edits in place. | ||
echo "*****************Setting up the Build Environment******************" | ||
sudo sed -i 's/enabled=0/enabled=1/' /etc/yum.repos.d/epel.repo | ||
sudo yum -y update | ||
sudo yum -y upgrade | ||
# I need to check which of these are needed | ||
sudo yum -y install git gcc-gfortran clang m4 patch ncurses-devel python-devel | ||
#Set up Julia | ||
echo "*****************Cloning Julia*************************************" | ||
git clone https://github.com/JuliaLang/julia.git | ||
cd julia | ||
git checkout v0.4.7 | ||
#Determine the number of CPUs to build on | ||
NUM_CPUS=$(lscpu | awk '/^CPU\(s\):/ {print $2}') | ||
echo "*****************Making Julia on $NUM_CPUS CPUs***************************" | ||
#Takes 30 minutes on a 4CPU p2.xlarge AWS instance | ||
time make -j $NUM_CPUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters