Skip to content

Latest commit

 

History

History
106 lines (93 loc) · 7.02 KB

INSTALL.md

File metadata and controls

106 lines (93 loc) · 7.02 KB

Installation Instructions

To install and run MyCaffe you will need to do the following steps. As a side note, we are using (and recommend) CUDA 11.8.0 with cuDNN 8.8.0 and Visual Studio 2022 on Windows 10 Pro and Windows 11 for all of our testing. (NOTE: Only compute 5.2 and above are supported in CUDA 11.8.0/cuDNN 8.8.0 due to 5.1 and lower compute phase-out in CUDA 11.8)

I. CUDA - Install NVIDIA CUDA and cuDNN Libraries

Install CUDA 11.8.0 as shown below.

A. CUDA 11.8.0 - Install NVIDIA CUDA and cuDNN Libraries

1.) Install the NVIDIA CUDA 11.8.0 Toolkit for Windows 10/11 from https://developer.nvidia.com/cuda-downloads.
2.) Install the NVIDIA cuDNN 8.8.0 Accelerated Libraries for CUDA 11.8.0 on Windows 10/11 from https://developer.nvidia.com/cuDNN.
3.) Create a new directory off your $(CUDA_PATH_V11_8) installation location named cudann_11.8-win-v8.8.0.121 and copy the cuDNN cudnn.h and cudnn.lib files into it.
4.) Copy the cudnn64_8.dll and associated DLL files into the $(CUDA_PATH_V11_8)\bin directory.
5.) Install the NVIDIA NVAPI (r511) from https://developer.nvidia.com/nvapi.
6.) Create a new directory off your $(CUDA_PATH_V11_8) installation location named nvapi_515 and copy the NVAPI header and library files into it.

NOTE: The CudaDnnDLL project points to the file directories noted above for the cuDNN include and library files.

Note when building, select the Release/Debug and x64 configuration.

II. Setup Strong Names and Signing

The MyCaffe project, uses the following strong name key files:
The CudaControl uses the CudaControl.pfx located in the packages\CudaControl.0.11.8.x\lib\Net40\ directory. If you download, build the CudaControl repository and create a new CudaControl.pfx file, you should also copy it into the packages\CudaControl.0.11.8.x\lib\Net40\ directory, replacing the pfx file there. Alternatively, you can just install the CudaControl package from NuGet.

The MyCaffe projects use key files for assembly signing. Before building either disable signing, or replace the *.pfx files with your own. If you do not, you will get the compiler error Unable to get MD5 checksum for the key file '...'.

You will need to provide your own strong names for each of the other MyCaffe projects. To do this just select the project Properties | Signing tab and then Sign the assembly with your strong name keyfile. You can also use this method to create a new *.pfx file mentioned above, or disable assembly signing altogether.
If you change these, please do not check them in. NOTE: The current .gitignore file ignores pfx files.


Follow these specific steps to update strong names:


1.) Right click the project (like MyCaffe.basecode) and select 'Properties'
2.) Select the 'Signing' tab.
3.) In the 'Choose a strong name key file:' open the drop-down and select '"
4.) Add your new key file name with your password. *Make sure the file name is different from the current one listed.
5.) Repeat this step for the following projects;


MyCaffe
MyCaffe.basecode
MyCaffe.converter.onnx
MyCaffe.data
MyCaffe.db.image
MyCaffe.db.stream
MyCaffe.extras
MyCaffe.gym
MyCaffe.gym.python
MyCaffe.layers.alpha
MyCaffe.layers.beta
MyCaffe.layers.nt
MyCaffe.layers.ssd
MyCaffe.layers.hdf5
MyCaffe.model
MyCaffe.preprocessor
MyCaffe.test
MyCaffe.test.automated
MyCaffe.trainers

III. Required Software

MyCaffe requires the following software.

a.) Microsoft Visual Studio 2022 (recommended) or Microsoft Visual Studio 2019

b.) Microsoft SQL or Microsoft SQL Express from https://www.microsoft.com/en-us/sql-server/sql-server-downloads
IMPORTANT - You must install the full SQL or SQL Express from the link above which is different that the 'lightweight' version of SQL installed with Visual Studio.

c.) nccl64_134.11.8.dll - If you plan on running multi-GPU training sessions, you will need the nccl64_134.11.8.dll, which must be placed in a directory that is visible by your executable files. This library can be built from the MyCaffe\NCCL repository. Alternatively, it is installed by the CudaControl NuGet package and placed in the packages\CudaControl.1.11.8.x\lib\Net40 directory. You should copy the library into a directory that is visible by your executable files. NOTE: The automated multi-GPU tests use GPU's 1-4 where the monitor is plugged into GPU 0.

IV. Create The Database

MyCaffe uses Microsoft SQL (or Microsoft SQL Express) as its underlying database. You will need to create the database with the following steps:
1.) Run the MyCaffe.app.exe test application and select the 'Database | Create Database' menu item.
2.) From the Create Database dialog, select the location where you want to create the database and select the OK button.
3.) Next, load the MNIST data by selecting the 'Database | Load MNIST...' menu item and follow the steps to get the data files.
4.) Next, load the CIFAR-10 data by selecting the 'Database | Load CIFAR-10...' menu item and follow the steps to get the data files.
NOTE: The automated tests expect that both the MNIST and CIFAR-10 datasets have already been loaded into the database.

Final Build Steps

If you get a compiler error stating Couldn't process file *.resx due to its being in the Internet or Restricted Zone or having the mark of the web on the file, follow these steps to resolve the error:
1.) Go to the file in the File Explorer, right click and select the 'Properties' menu item.
2.) In the Properties dialog, check the 'Unblock' option and press OK.
3.) If, after making these changes, you still see errors just restart Visual Studio and re-build.

Test Installation Instructions

To install data used by the Automated Tests, you will need to install the following files:

See Installing BVLC NIN Model
See Installing BLVC_FCN Model

Both of these models are used by the TestPersistCaffe.cs auto tests.

Debugging Instructions

Before debugging, you will need to copy the CUDA files into your output target directory. To do this, copy the '\Program Files\SignalPop\MyCaffe\cuda_11.8' folder to the target output directory of your application (e.g. ..\Temp\MyApp\bin\Debug).

Next, from within your Debug settings for your application, set the debug Working Directory to this same target output directory (e.g. ..\Temp\MyApp\bin\Debug).

Happy deep learning!