{"action":"created","issue":{"url":"https://api.github.com/repos/pfnet/chainer/issues/42","labels_url":"https://api.github.com/repos/pfnet/chainer/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/pfnet/chainer/issues/42/comments","events_url":"https://api.github.com/repos/pfnet/chainer/issues/42/events","html_url":"https://github.com/pfnet/chainer/issues/42","id":88194643,"number":42,"title":"How to train with CUDA in AWS","user":{"login":"ukyou258847","id":12882996,"avatar_url":"https://avatars.githubusercontent.com/u/12882996?v=3","gravatar_id":"","url":"https://api.github.com/users/ukyou258847","html_url":"https://github.com/ukyou258847","followers_url":"https://api.github.com/users/ukyou258847/followers","following_url":"https://api.github.com/users/ukyou258847/following{/other_user}","gists_url":"https://api.github.com/users/ukyou258847/gists{/gist_id}","starred_url":"https://api.github.com/users/ukyou258847/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukyou258847/subscriptions","organizations_url":"https://api.github.com/users/ukyou258847/orgs","repos_url":"https://api.github.com/users/ukyou258847/repos","events_url":"https://api.github.com/users/ukyou258847/events{/privacy}","received_events_url":"https://api.github.com/users/ukyou258847/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-14T14:37:43Z","updated_at":"2015-06-15T05:38:52Z","closed_at":null,"body":"I tried to use GPU in AWS and failed.\r\nI used g2.2xlarge with Amazon Linux AMI with NVIDIA GRID GPU Driver, which I think the easiest way to use cuda.\r\n\r\nThe commands I tried: \r\n\r\n#install Anaconda\r\nwget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.2.0-Linux-x86_64.sh\r\nbash Anaconda-2.2.0-Linux-x86_64.sh -b\r\necho 'export PATH=$HOME/anaconda/bin:$PATH' >> .bashrc\r\necho 'export PYTHONPATH=$HOME/anaconda/lib/python2.7/site-packages:$PYTHONPATH' >> .bashrc\r\nsource .bashrc\r\nconda update conda -y\r\n#install chainer\r\npip install chainer\r\nsudo apt-get install git\r\ngit clone https://github.com/pfnet/chainer.git\r\npip install -r chainer/chainer/requirements/cuda-requirements.txt\r\npython chainer/examples/mnist/train_mnist.py --gpu 1\r\n\r\n\r\nThe error I encountered:\r\n\r\nTraceback (most recent call last):\r\n  File \"chainer/examples/mnist/train_mnist.py\", line 40, in <module>\r\n    cuda.init(args.gpu)\r\n  File \"/home/ec2-user/anaconda/lib/python2.7/site-packages/chainer/cuda.py\", line 119, in init\r\n    device  = Device(device)\r\npycuda._driver.LogicError: cuDeviceGet failed: invalid device\r\n\r\nCould you help me? \r\nI think it is better to release the official chainer AMI for GPU instances."},"comment":{"url":"https://api.github.com/repos/pfnet/chainer/issues/comments/111933334","html_url":"https://github.com/pfnet/chainer/issues/42#issuecomment-111933334","issue_url":"https://api.github.com/repos/pfnet/chainer/issues/42","id":111933334,"user":{"login":"ukyou258847","id":12882996,"avatar_url":"https://avatars.githubusercontent.com/u/12882996?v=3","gravatar_id":"","url":"https://api.github.com/users/ukyou258847","html_url":"https://github.com/ukyou258847","followers_url":"https://api.github.com/users/ukyou258847/followers","following_url":"https://api.github.com/users/ukyou258847/following{/other_user}","gists_url":"https://api.github.com/users/ukyou258847/gists{/gist_id}","starred_url":"https://api.github.com/users/ukyou258847/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukyou258847/subscriptions","organizations_url":"https://api.github.com/users/ukyou258847/orgs","repos_url":"https://api.github.com/users/ukyou258847/repos","events_url":"https://api.github.com/users/ukyou258847/events{/privacy}","received_events_url":"https://api.github.com/users/ukyou258847/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T05:38:52Z","updated_at":"2015-06-15T05:38:52Z","body":"It worked! I should have noticed that id starts from zero. Thank you."}}