when will you release digits for windows,
there's one caffe-windows at http://pan.baidu.com/s/1eQ6bWK6
Windows is not officially supported even in Caffe. I've done my best to keep the code in DIGITS platform-independent though (with a few exceptions, like in digits.config), so it shouldn't be too much work to get it running. At present, however, there is no plan to begin supporting Windows. If you do try to implement it yourself, I would love to hear how it goes and would be happy to provide any advice that I can.
@lukeyeager : Caffe is supported on windows by Microsoft now. check out the official branch here : https://github.com/Microsoft/caffe now I guess porting Digits to windows is rather easy compared to the time, caffe was'nt on windows!
@Coderx7 That's right. I've already tried to use Digits on Windows with that Windows Caffe version and I could do it (check the last comment here: https://github.com/willyd/caffe-builder/issues/6)
@lunzueta : Great job ;) now I'm impatiently waiting for your guide on how to get DIGITS to work on windows ;)
@Coderx7 Probably not the best way, but here is a very brief guide of what I did:
- Install Python. In my case, I installed Anaconda (https://www.continuum.io/downloads). Optionally, you can also install PyCharm (https://www.jetbrains.com/pycharm/) to configure and run the Python projects in a more visual way.
- Install Graphviz for Windows (http://www.graphviz.org/Download_windows.php) and include its bin directory in the 'path' environment variable.
- Checkout the 'windows' branch of Caffe (https://github.com/BVLC/caffe/tree/windows) and compile it (quite straightforward to do this, just follow the instructions explained there).
- Include the 'caffe' folder generated when compiling 'pycaffe' (the one inside the 'CAFFE_PATH\Build\x64\Release\pycaffe' folder), in the folder 'C:\Anaconda2\Lib\site-packages', so that Caffe can then be imported as an external library in your Python project.
- Checkout Digits from its Github repo.
- Open a Windows Command Prompt, go to the folder where Digits is installed and run this:
python -m pip install -r requirements.txt - Then, run this:
python digits-devserverand you'll be able to see Digits on http://localhost:5000 and use it normally. I wasn't able to run the 'digits-server' bash file yet, but I guess this can also be "windows"-ized with some more dedication.
Hope this helps.
Great job indeed ;) Thanks a gazillion ;-)
@lunzueta : I'm getting an error when I try to run digits-devserver,
T:\DIGITS-master>python digits-devserver
Default value for caffe_root "<PATHS>" invalid:
caffe binary not found in PATH
==================================== Caffe =====================================
Where is caffe installed?
Suggested values:
(P*) [PATH/PYTHONPATH] <PATHS>
I Imported caffe successfully,and also added the caffe bin directory (Build\X64\Release\pycaffe\caffe) as well, yet this error is happening. I would really appreciate a guidance here. Thanks in advance
@Coderx7 Hi. Now I'm testing all this in another PC to be sure that I didn't miss anything in the explanation above, but I'm still on it. Maybe this is happening because you should also add this directory to the 'path' environment variable: 'CAFFE_PATH\Build\x64\Release'. Let me know.
@lunzueta :Hi, Actually I have set the Path environment variable as well, this actually looks like this:
%CAFFE_ROOT%\pycaffe\caffe;%CAFFE_ROOT%
in which CAFFE_ROOT is a user variable with the value of : T:\Caffe\Build\x64\Release.
I also tried logging off and even restarting my PC, still no luck.
should I add caffe to the python path as well? I'm not a python coder you know!
@Coderx7 , I modified the ./digits/config/caffe_option.py, line 87 to let DIGITS know where the caffe.exe is. Then modify line 197 from parse_version(0,11,0) to parse_version(0,12,0) to let DIGITS know that the caffe.exe is built by Visual Studio 2013. Hope these hints would help you.
@happynear : Thanks alot , the server is now running.going to test with mnist in a minute ;)
@Coderx7 I've just installed everything in another PC, following the "brief guide" I explained above, and also including 'CAFFE_PATH\Build\x64\Release' in the 'path' environment variable, and I could also run it correctly. @happynear why are those modifications you mention needed?
Ok, I deleted everything and started from scratch.
I installed Anaconda2 ( the latest version ) .
Followed @lunzueta 's guide and then applied the @happynear 's modification actually in two places inside caffe_options.py (line 114 and 210 like following):
line 114: executable = 'T:/Caffe/Build/x64/Release/caffe.exe'#os.path.join(path, program)
line 210: executable = 'T:/Caffe/Build/x64/Release/caffe.exe'#os.path.join(value, 'build', 'tools', 'caffe')
and I didnt change anything else (didnt need to change line 196 (return parse_version(0,11,0) )
and to my astonishment, everything is working just fantastic!
Thanks again guys .
(by the way I noticed when I tried to use Show visualizations and statistics, python.exe crashed. if I uncheck it and classify everything is fine. but with that option checked the python crashed. Any Idea on this?
@Coderx7 Good to know that it also worked in your side. Yes, I also got that error you mention when Show visualizations and statistics is activated when testing. So, I guess we still can't say that the compatibility issue is completely solved. I don't know if this happened because of Digits' code or because we aren't using Nvidia's Caffe fork.
@lunzueta yes, you are right. I couldn't either use debugging to know for sure whats going on. I listened to your suggestion and installed Pycharm the community edition, but when ever I tried to run debug! everything froze! tried it for couple of times, yet nothing changed. the same thing made me use print and log for debugging ! and you saw how that turned out! dont know what the problem is though. If debugging worked, I'm 100% sure we could figure out the cause much sooner.
There might be a temporary solution. If I loaded h5py before caffe, the problem seemed to disappear. The hdf5 DLL loaded by h5py and Caffe were different. h5py is using a newer version, while the one in nuget (for Caffe) is old.
Hello! This is my first post in github, so please forgive me if I did sth wrong.
Hmm... Strange, I followed @lunzueta guide and everything is working for me! (Including the Show visualizations and staticstics). Here is what I have done:
- I compiled caffe from @happynear's branch (follow his exact instruction, especially the python wrapper stuff): https://github.com/happynear/caffe-windows
- I downloaded Anaconda2 as my python. Installed it, got an error that need to be ignored at the end of the installation, but somehow it still works for me.
- Pycaffe from happynear branch has some requirement. I have to remove level-db and protobuf from the requirement.txt under caffe-windows-master/python, do a pip install just like @lunzueta said (for pycaffe, NOT for DIGITS, that's a later step). Then I followed @happynear to recompile level-db and install protobuf manually (the instruction is in @happynear 's caffe branch in the link above).
- I made sure to correctly modified the python include and python library path in happynear's caffe Visual studio project to point them to Anaconda2 include and libs directories. Then I compile pycaffe.
- I then copied the caffe folder under caffe-windows-master/python to Anaconda2/Lib/site-packages.
- Then I download DIGITs repository: https://github.com/NVIDIA/DIGITS
- Again, I check the requirements.txt under DIGITS-master/ and make sure to remove level-db or protobuf. Then pip install the requirements. ** NOTE ** For pip install to work smoothly, I have to install Visual C++ for Python: https://www.microsoft.com/en-us/download/details.aspx?id=44266 And also create a bat file with all the required paths to binaries and dlls, then run the bat file as ADMINISTRATOR. The content of the bat file for DIGITS-master python requirements.txt is:
REM If this bat file is run as administrator, REM the program will start from %SystemRoot%\System32 REM Thus, first go to the folder where the bat file is run cd /D %~dp0
PATH=.;^ ..\Anaconda2;^ %SystemRoot%\System32;^ %SystemRoot%
python.exe -m pip install -r requirements.txt
pause
Forgot to mention: you need a similar bat file for pycaffe's requirements.txt. 8. The key difference is that** I don't modify caffe_options.py**. Instead, I created a bat file that contain the paths to all required binaries and dlls. One thing I noticed is that somehow the PATH environment for digits-devserver MUST BE ABSOLUTE PATH, meaning you can't use "..". The content of digit server running bat file is:
REM If this bat file is run as administrator, REM the program will start from %SystemRoot%\System32 REM Thus, first go to the folder where the bat file is run cd /D %~dp0
PATH=.;^ D:\University of Oklahoma\Projects\Caffe\Anaconda2;^ D:\University of Oklahoma\Projects\Caffe\caffe-windows-master\3rdparty\bin;^ D:\University of Oklahoma\Projects\Caffe\caffe-windows-master\bin;^ D:\University of Oklahoma\Projects\Caffe\Graphviz2.38\bin;^ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin; %SystemRoot%\System32;^ %SystemRoot%
python.exe digits-devserver
pause
Here I put DIGITS-master, Anaconda2, caffe-windows-master, and Graphviz2.38 into one single place called D:\University of Oklahoma\Projects\Caffe. The bat file is named run_digit.bat and is put in D:\University of Oklahoma\Projects\Caffe\DIGITS-master.
After that, everything is working (except Torch, which I can't find any source to compile on Windows using Visual Studio, but it's not required anyways).
FYI, I'm compiling caffe with compute capability of 30 (I have GTX 660 card). I tested it on both Windows 7 and Windows 10 Enterprise 64 bit. I guess "Show Visualization and statistics" option doesn't work for you guys because you modified the caffe-options.py?
Thanks for the information. I built my caffe from https://github.com/microsoft/caffe, and installed Python 2.7.11 64-bit from official Python site. The h5py package was from UCI's unofficial python package site. In my case, I didn't modify caffe_options.py. I guess the 3rdparty libraries which were mentioned in (https://github.com/happynear/caffe-windows) could be different from those in nuget.
Hi, first, thank you all for the hard work to port DIGITS to win. I followed the guides mentioned in this thread, repeated the installation process several times, but everytime I get following error while running training (I had no trouble creating lmdb sets):
Traceback (most recent call last):
File "d:\Toolkits\DIGITS\digits\scheduler.py", line 484, in run_task
task.run(resources)
File "d:\Toolkits\DIGITS\digits\task.py", line 250, in run
self.after_runtime_error()
File "d:\Toolkits\DIGITS\digits\model\tasks\caffe_train.py", line 937, in after_runtime_error
output = subprocess.check_output(['tail', '-n40', self.path(self.CAFFE_LOG)])
File "C:\Anaconda2\lib\subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, \*popenargs, \**kwargs)
File "C:\Anaconda2\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Anaconda2\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Unfortunatelly I'm no pythonist so I have no clue how to resolve this. I'm using the Microsoft caffe branch successfully for some time now and it alone is working fine. It'd be nice to have some gui though :)
BTW. I know that caffe.exe is accessible from the caffe_output.log. So the problem is probably somewhere else.
Does anybody have the same issue ?
The system cannot find the file specified error indicates it can not find your caffe, at least this was in my case.
try using the full path for caffes executable, or use the one I myself used! here
hope this helps