6 ms·
All the steps needed to create deep dream animations on EC2
- jmount 11y agoI really wanted to run the deep dream and deep dream animation scripts people have created. I am now re-sharing the instructions I found (with links to original guides). It isn't an automated install. You pretty much have to paste the lines one by one. But I did replace any "edit" steps with append or patch. To do this on a fresh Ubuntu EC2 g instance there are a lot of steps- but I have tested them and put them all in one place (with links to the original sources and guides). I have CUDA up but not CUDNN as I haven't found how to legitimately download CUDNN without registering on the NVIDIA website. Again: credit to the actual creators and all the original guide authors.
- jerf 11y agoFor better or for worse, with shell, the line between "a list of instructions to be typed in" and "shell script" is very, very thin. Toss a #!/usr/bin/bash set -e on top of that, call it "setup.sh", and give it a runthrough, and you're halfway to it being as "automated" as it needs to be to start with. You're fall more likely to get people start PR'ing a running shell script than dead text files. (set -e will make the script stop when something returns with an error exit code. Despite temptation, given the size of this script I do advise doing your best to work with that... this is just the sort of script that if you let it blunder ahead blindly, when something doesn't work you'll need an hour just to figure out what didn't work, let alone fix it....)
- jmount 11y agoSome of the steps require user input. Is the "set -e" for dealing with that? Also at least one reboot is needed, the script depends on a lot of external sources being up, and I have seen different behavior on the kernel upgrade steps.
- jerf 11y agoNo, see edit. But there are ways to do user input in shell, see Google. (By which I mean I literally do not personally know the best answers and that's what I'd be doing anyhow if I tried to explain here.)
- dktbs 11y agoThanks for updating and organizing all of this. I got a working EC2 instance with CUDA and CUDNN working yesterday but it took some time. Having all of this is one place is excellent.
- deepnet 11y agoThanks, the Caffe on the PYTHONPATH was the bit I needed.
- fennecfoxen 11y agoThat's pretty insane. It makes me really appreciate that I get to use package managers and Puppet/Vagrant scripts for most of the stuff I program.
- jmount 11y agoYeah, I don't normally "do my own infrastructure" (I know, "it shows"). Usually the client or vendor has supplied the build. And I didn't want to commit to a package manager early in the exercise (in case it turned out to be incompatible with something one of the dependent projects did). So I just tried to start from the Caffe instructions and then fix things that broke. The main components turned out to be: NVIDIA/CUDA, python, Caffe, ffmpeg. I was very surprised how many steps ffmpeg took.
- facetube 11y agoWould you be willing to publish an AMI of the completed image? Seems like that'd make it really easy to run without all of the package management work.
- jmount 11y agoYes, I have a running instance up now in USWest. If it is free and somebody could shoot me instructions I'll make it an AMI (after lunch, on the way out the door right now).
- jmount 11y agoActually I started looking into it. I don't think I am going to make the AMI. First I am not sure if the NVIDIA driver licenses do or do not allow this. Second I would have to tear down my current run and pay S3 charges to distribute the AMI. Third the instructions are long and ugly ( http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-... ) even after seeing the setup steps. Finally as people have mentioned in other comments there is a good to go Docker image for people to also play with. Sorry about that.
- shreyask 11y agoThese steps are cool and very detailed, also check out https://github.com/VISIONAI/clouddream https://github.com/VISIONAI/clouddream which is containerized so you can try it on local machine as well as on EC2.
- jmount 11y agoThanks, that might be the better option for a lot of people. I'll add that to the readme.
- azinman2 11y agoOr... Just use deepdreamer.io
- dktbs 11y agoThat is definitely the more convenient option for running the defaults, but I think this is for a different usecase. If someone wanted faster results and full access to edit the python code and caffe models, this would be the better option.
- azinman2 11y agoIt's a bit better than the defaults because it generates many at once. But ya if you really wanna hack on it...
- tacos 11y agoAt $2.60 an hour you'd think the Python code would be smart enough to expand "~" -- and call "avconv" instead of "avconf" -- or use a recent version of Ubuntu that avoids the ffmpeg vs avconv drama. You'd also think people rendering movies would input and output PNG instead of JPEGs at 75% quality. But you'd be wrong. I appreciate the excitement around this but the people on the fringe hacking this shit together really should be ashamed of themselves. The core is so great! The script kiddie stuff wrapping it is SO BAD! This is perhaps the 15th attempt I've seen at it. Maybe the dumbest one yet. We have Docker. We have AMI. We have scripts. And... we have people spinning up servers at $2.60/hr where you have to wait an indeterminate amount of time for some marketing intern to enable your NVIDIA developer application. Google anything related to this technology and you'll immediately see a ton of people having the same three problems over and over. All due to sloppy packaging by people who basically Googlebombed keywords with their half-baked github experiments. Slapping some half-baked shit onto Github isn't open source. It's littering. And everyone knows "here's how to install!" walkthroughs never work for more than a week. STOP DOING IT.
- modeless 11y ago$2.60/hr is way overpaying. For this task people should definitely be using spot instances, which are $0.32/hr. Big difference! It seems to me like they should also switch from g2.8xlarge to g2.2xlarge because caffe does not benefit much from multiple GPUs. That brings the cost to $0.07/hr; more than an order of magnitude difference.
- tacos 11y agoActually multiple instances of CAFFE rendering these models is working well for me. I'm paralleling 16 processes across 8 GPUs and everything fits. (Training might not work as well.) Spot instances are great until the random hedgefund peak sneaks in and deletes all your work. Your guidance for people just noodling around is right on the mark, though! The 2x machines are fine for playing and, once you get the AMI set up (hint hint) it's a two minute upgrade.
- NathanKP 11y ago> Slapping some half-baked shit onto Github isn't open source. It's littering. What a negative attitude... Every programmer has written plenty of shitty code. I know that I wrote lots of garbage code when I was a teenager just learning how to code. Unfortunately that was long before Github (or even Git) was a thing, and most of that code is either lost forever, or inaccessible on old floppy disks, etc. But today I would love it if my shitty Basic A text based games, and C code full of memory leaks still existed somewhere like Github, where I could look back at it and see how far I've come. Projects like this one aren't intended to be open source masterpieces. They are fun learning projects by people who enjoy building stuff. If you don't like it then don't pay it any attention and build your own that is better. At least this guy put something together and documented the experience so someone else could follow up and improve on it if they wish.
- amelius 11y agoThis is really cool, but honestly, I'm getting a bit tired of seeing all those "eyes". I want to feed it my own training image set. Is that possible? Alternatively, is there a way to specify I don't want to enhance on certain outputs, like "dogs" and "faces"?