yasserzamani closed pull request #11258: [MXNET-540] update python gpu build
from source instructions on windows
URL: https://github.com/apache/incubator-mxnet/pull/11258
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ci/build.py b/ci/build.py
index 4473f54210a..35f8b478abf 100755
--- a/ci/build.py
+++ b/ci/build.py
@@ -34,6 +34,7 @@
import subprocess
import sys
import tempfile
+import platform
from copy import deepcopy
from itertools import chain
from subprocess import call, check_call
@@ -121,11 +122,16 @@ def buildir() -> str:
def default_ccache_dir() -> str:
+ # Share ccache across containers
if 'CCACHE_DIR' in os.environ:
ccache_dir = os.path.realpath(os.environ['CCACHE_DIR'])
os.makedirs(ccache_dir, exist_ok=True)
- return ccache_dirpython
- # Share ccache across containers
+ return ccache_dir
+ # In osx tmpdir is not mountable by default
+ if platform.system() == 'Darwin':
+ ccache_dir = "/tmp/_mxnet_ccache"
+ os.makedirs(ccache_dir, exist_ok=True)
+ return ccache_dir
return os.path.join(tempfile.gettempdir(), "ci_ccache")
diff --git a/docs/install/index.md b/docs/install/index.md
index 4b966b62067..0a102394ec7 100644
--- a/docs/install/index.md
+++ b/docs/install/index.md
@@ -1703,7 +1703,7 @@ msbuild mxnet.sln /p:Configuration=Release;Platform=x64
/maxcpucount
To build and install MXNet yourself using [Microsoft Visual Studio
2015](https://www.visualstudio.com/vs/older-downloads/), you need the following
dependencies. Install the required dependencies:
-1. If [Microsoft Visual Studio
2015](https://www.visualstudio.com/vs/older-downloads/) is not already
installed, download and install it. You can download and install the free
community edition.
+1. If [Microsoft Visual Studio
2015](https://www.visualstudio.com/vs/older-downloads/) is not already
installed, download and install it. You can download and install the free
community edition. At least Update 3 of Microsoft Visual Studio 2015 is
required to build MXNet from source. Upgrade via it's ```Tools -> Extensions
and Updates... | Product Updates``` menu.
2. Download and install [CMake](https://cmake.org/) if it is not already
installed.
3. Download and install
[OpenCV](http://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.0.0/opencv-3.0.0.exe/download).
4. Unzip the OpenCV package.
@@ -1711,10 +1711,12 @@ To build and install MXNet yourself using [Microsoft
Visual Studio 2015](https:/
6. If you don't have the Intel Math Kernel Library (MKL) installed, download
and install [OpenBlas](http://sourceforge.net/projects/openblas/files/v0.2.14/).
7. Set the environment variable ```OpenBLAS_HOME``` to point to the
```OpenBLAS``` directory that contains the ```include``` and ```lib```
directories. Typically, you can find the directory in ```C:\Program files
(x86)\OpenBLAS\```.
8. Download and install
[CUDA](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64)
and [cuDNN](https://developer.nvidia.com/cudnn). To get access to the download
link, register as an NVIDIA community user.
+9. Set the environment variable ```CUDACXX``` to point to the ```CUDA
Compiler```(```C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.1\bin\nvcc.exe``` for example).
+10. Set the environment variable ```CUDNN_ROOT``` to point to the ```cuDNN```
directory that contains the ```include```, ```lib``` and ```bin``` directories
(```C:\Downloads\cudnn-9.1-windows7-x64-v7\cuda``` for example).
After you have installed all of the required dependencies, build the MXNet
source code:
-1. Download the MXNet source code from
[GitHub](https://github.com/apache/incubator-mxnet).
+1. Download the MXNet source code from
[GitHub](https://github.com/apache/incubator-mxnet) (make sure you also
download third parties submodules e.g. ```git clone --recurse-submodules```).
2. Use [CMake](https://cmake.org/) to create a Visual Studio solution in
```./build```.
3. In Visual Studio, open the solution file,```.sln```, and compile it.
These commands produce a library called ```mxnet.dll``` in the
```./build/Release/``` or ```./build/Debug``` folder.
diff --git a/example/README.md b/example/README.md
index 542162c0bf6..0dc6138c2ef 100644
--- a/example/README.md
+++ b/example/README.md
@@ -1,6 +1,6 @@
# MXNet Examples
-This page contains a curated list of awesome MXNet examples, tutorials and
blogs. It is inspired by [awesome-php](https://github.com/ziadoz/awesome-php)
and
[awesome-machine-learning](https://github.com/josephmisiti/awesome-machine-learning).
+This page contains a curated list of awesome MXNet examples, tutorials and
blogs. It is inspired by [awesome-php](https://github.com/ziadoz/awesome-php)
and
[awesome-machine-learning](https://github.com/josephmisiti/awesome-machine-learning).
See also [Awesome-MXNet](https://github.com/chinakook/Awesome-MXNet) for a
similar list.
- [Contributing](#contributing)
- [List of examples](#list-of-examples)
@@ -28,7 +28,7 @@ Example applications or scripts should be submitted in this
`example` folder.
### Tutorials
-If you have a tutorial idea for the website, download the [ Jupyter notebook
tutorial
template](https://github.com/dmlc/mxnet/tree/master/example/MXNetTutorialTemplate.ipynb).
+If you have a tutorial idea for the website, download the [Jupyter notebook
tutorial
template](https://github.com/dmlc/mxnet/tree/master/example/MXNetTutorialTemplate.ipynb).
#### Tutorial location
@@ -45,9 +45,11 @@ The site expects the format to be markdown, so export your
notebook as a .md via
```
If you want some lines to show-up in the markdown but not in the generated
notebooks, add this comment `<!--notebook-skip-line-->` after your
``. Like this:
+
```
<!--notebook-skip-line-->
```
+
Typically when you have a `plt.imshow()` you want the image tag
`[png](img.png)` in the `.md` but not in the downloaded notebook as the user
will re-generate the plot at run-time.
#### Tutorial tests
@@ -151,7 +153,8 @@ If your tutorial depends on specific packages, simply add
them to this provision
* [LSTM Human Activity
Recognition](https://github.com/Ldpe2G/DeepLearningForFun/tree/master/Mxnet-Scala/HumanActivityRecognition)
by [Ldpe2G](https://github.com/Ldpe2G)
* [Visual Question
Answering](https://github.com/liuzhi136/Visual-Question-Answering) by
[liuzhi136](https://github.com/liuzhi136)
* [Deformable ConvNets](https://arxiv.org/abs/1703.06211)
([github](https://github.com/msracver/Deformable-ConvNets)) by
[MSRACVer](https://github.com/msracver)
-
+* [OCR with bi-LSTM and CTC Loss in
Gluon](https://github.com/ThomasDelteil/Gluon_OCR_LSTM_CTC) by
[ThomasDelteil](https://github.com/ThomasDelteil)
+* [Visual Search with Gluon and
HNSWlib](https://github.com/ThomasDelteil/VisualSearch_MXNet), by
[ThomasDelteil](https://github.com/ThomasDelteil), online demo
[here](https://thomasdelteil.github.io/VisualSearch_MXNet/)
### <a name="ipython-notebooks"></a>IPython Notebooks
-----------------
@@ -164,7 +167,7 @@ If your tutorial depends on specific packages, simply add
them to this provision
* [class active
maps](https://github.com/dmlc/mxnet-notebooks/blob/master/python/moved-from-mxnet/class_active_maps.ipynb)
- A demo of how to localize the discriminative regions in an image using
global average pooling (GAP) in CNNs.
* [DMLC MXNet Notebooks](https://github.com/dmlc/mxnet-notebooks) DMLC's repo
for various notebooks ranging from basic usages of MXNet to state-of-the-art
deep learning applications.
* [AWS Seoul Summit 2017
Demos](https://github.com/sxjscience/aws-summit-2017-seoul) The demo codes and
ipython notebooks in AWS Seoul Summit 2017.
-* [Character-level CNN for text
classification](https://github.com/ThomasDelteil/CNN_NLP_MXNet) Performing
category classification on Amazon reviews using Gluon and character-level
Convolutional Neural Networks
+* [Character-level CNN for text
classification](https://github.com/ThomasDelteil/CNN_NLP_MXNet) Performing
category classification on Amazon reviews using Gluon and character-level
Convolutional Neural Networks. Online demo
[here](https://thomasdelteil.github.io/CNN_NLP_MXNet/)
### <a name="mobile-apps-examples"></a>Mobile App Examples
-------------------
@@ -220,4 +223,3 @@ If your tutorial depends on specific packages, simply add
them to this provision
* [MXnet-face](https://github.com/tornadomeet/mxnet-face) - Using mxnet for
face-related algorithm by [tornadomeet](https://github.com/tornadomeet) where
the single model get 97.13%+-0.88% accuracy on LFW, and with only 20MB size.
* [MinPy](https://github.com/dmlc/minpy) - Pure numpy practice with third
party operator Integration and MXnet as backend for GPU computing
* [MXNet Model Server](https://github.com/awslabs/mxnet-model-server) - a
flexible and easy to use tool for serving Deep Learning models
-* [ONNX-MXNet](https://github.com/onnx/onnx-mxnet) - implements ONNX model
format support for Apache MXNet
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services