[Help] Alternatives to AWS and Microsoft Azure

Howdy,

This post was initiated through a help ticket that I created. I was advised to ask the forums as it would possibly help myself and others. I apologize if this question has already been posted as I was not able to find any information using the search function. I will be posting the initial correspondence with Rachel Thomas for clarification and ease of typing for myself. I will also below add additional information about my situation and resources in the event that it aids in providing a better answer.

Howdy,

My name is Justin Harris and I am eagerly working through the beginning stages of the fast ai course. I am currently a college student at Texas A&M University and in my current situation I am finding it difficult to work with the AWS service monetarily. I am writing in hopes that there are other possibilities that I may have missed while reading through the course that would be fairly inexpensive or free. I have a laptop with an onboard Nvidia GPU (also has an Intel integrated GPU) as well as a desktop. I am curious as to if there are any services that are more accessible to students or if there is a way to use my mid-tier GPU’s on my current machines. If the only option is AWS or Microsoft Azure then I will buckle and attempt to budget for these services. Any information would be greatly appreciated.

Sincerely,

Justin

My current resources consist of a Laptop that contains an Nvidia GTX 970m (I know not very powerful), as well as a desktop with an Nvidia GTX 960 (Again not powerful). During the semester I may be able to obtain access to the necessary hardware, although this is very much a maybe, through my university. In the event that I cannot, I may be able to scrape together the funds to afford the AWS solution. Currently, I am unable to use the service as I have been denied the upgrade that I requested. I was rightfully denied on the basis that my account is new and I have yet to use the service to Amazons standard for the upgrade. Any alternative that is either free or is more in the area of a flat fee would be preferable. I understand that this type of work requires compute power. I am very interested in learning the material so regardless of my situation I will find a way but, any help from this community would be greatly appreciated.

Thank you for your time,

DBAggie

4 Likes

You can just install Theano and Keras on your own machine. I have the Anaconda 3 installation on my laptop with Windows that also has Nvidia GTX 970m graphics card. Lesson 1 works fine on my machine. I did run into an issue running out of memory, which was solved by decreasing the batch_size to 48 (will vary per machine).

2 Likes

You sir are a scholar and a gentlemen. Thank you very much for the information. I will do my best to document the installation process and make a guide for anyone else that has the same question. I was considering the memory issue but I am sure with a little painful tweaking I will be able to get everything to work.

2 Likes

Thanks for offering to make a guide @DBAggie For using a personal computer with a GPU, decreasing the batch size is a great suggestion @herk
If you don’t have a GPU and must run the code only on your CPU, you will also want to use a smaller sample of the data. Also, in the last lesson we show how to use different sized images, and resizing your images to a smaller size could be helpful if you don’t have a GPU

Great information @Rachel, Thank you.

@herk Did you have any issues installing Theano and Keras. I cannot for the life of me get these two to show up in conda list. Testing using a python cli or file doing import theano/keras shows that the modules do not exist. This is weird because the setup.py script seemed to run perfectly throwing no errors and completing. I am using Anaconda 2.7 and have installed all required dependencies as far as I know. I even went as far as installing Nvidia CUDA.

@DBAggie My trouble was having cygwin’s g++ in my system path, when I removed all instances of mingw except the on installed by conda, theano worked.

Which part are you stuck on? Have you looked through the documentation? http://deeplearning.net/software/theano/install_windows.html#install-windows

I mainly used these commands:
conda install mingw libpython
pip install theano
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git bleeding edge installation
pip install keras

Can you show some screenshots of the errors?

2 Likes

@herk The issue is there seems to be no issue. I am able to download Theano and run the setup with no errors but the module/library isnt being found by python. I have read through the documentation. I am going to attempt the install process again tomorrow and I will update with any new information. My problem may be due to not using the bleeding-edge install. I appreciate all of your help.

A 970m should be just fine for this course. The steps @herk shows above look great. You’ll also want to install visual studio 2013 community edition and the CUDA sdk, and you’ll need to add the appropriate path to your .theanorc .

I am almost positive I missed the PATH step @jeremy. Its been a hectic few days and I havent yet fixed the issue.

Setting up gpu support on windows is as simple as following these steps: https://lukassteindlblog.wordpress.com/2016/03/31/

3 Likes

I’ve found another technology stack that’s a bit more recent that works for:

Windows 10 / Visual Studio 2015 / Python 2.7 / Anaconda 4.2.0 / Cuda 8.0.44 / MinGW-w64 5.4.0 / Theano 0.8.2 / Keras 1.1.0 / OpenBlas 0.2.14 (optional) / cuDNN 5.1 (conditional for convolution neural networks)

https://github.com/glyphx/dlwin/blob/master/README.md <- I mainly used these instructions, perhaps I will modify them to reflect a few of the idiosyncrasies I found.

http://ankivil.com/installing-keras-theano-and-dependencies-on-windows-10/ <-- this helped me solve a few problems with the first link.

Namely to modify %USERPROFILE%/.keras/keras.json so that keras uses theano instead of tensorflow:
keras.json

{
“floatx”: “float32”,
“epsilon”: 1e-07,
“image_dim_ordering”: “th”,
“backend”: “theano”
}

I also had memory issues, we’ll see if that goes away when I get my own TitanXP on weds, muhahaha! To resolve the memory problems I had to pass new parameters to THEANO_FLAGS. The author has lib.cnmem=0.8, I had to lower mine to .7 or .65 to avoid crashing or slowdown.

My environment: https://gist.github.com/glyphx/0dd774b25f5ad63fbcbe10a205992d1a

https://drive.google.com/file/d/0B7OZ3ORJZNOISE95SnIxeFRBa1U/view?usp=sharing

Somehow I matched the author’s speed results, his titan, vs my 980: https://gist.github.com/glyphx/74dfce1a1736b8d669614a5570db8f86

If anyone implements this and has questions feel free to ask, I think I have a decent working understanding now.

Now that I finally have my environment set and I understand a bit more python it’s time to re-watch the first lessons and implement!

4 Likes

How about a 960M running on a Windows 10 notebook (32GB RAM, i5, 760GB SSD)?

Thanks - wg

Is there a way to set everything up without Anaconda?

I’m using virtualenv and manual install of python and I think I’m really close to getting everything to work. I am getting an error and I don’t know how to resolve it:

"WARNING (theano.configdefaults): g++ not available, if using conda: conda install m2w64-toolchain"

Like I said, I’d rather avoid Anaconda but I don’t have a clue as to how to resolve this.

Thanks

I tried @herk 's steps, I got a lot of errors. That’s why I sought a different approach, think it might have had something to do with 32/64 bits.

You have to link mingw and put it into your path so it can find g++.

You can find instructions on how to do that in the steps I listed above

I swear …

I checked my PATH right after I posted my issue and boom, there it was. I had fixed the link to mingw BUT I had to restart powershell for it to take effect.

Anyhow, thanks for the reply and the initial instructions. I was able to thus far get Theano operational without Anaconda … will work on Keras next.

Thanks again -wg

Yeah, the good ol’ reset your environment wasted like 1h of my total setup time, lol.

btw, how far have you gotten in the course running things on your Windows machine?

I got my AWS instance all setup but I’d love to reduce my expenses by doing as much development as possible on my notebook and then only deploying to AWS once things look good.

Not sure what other folks are doing but if you’re doing all the class work on your AWS instance, I can see that getting pricey depending on how many times you spin it up.