[GCP] Run tensorflow with GPU on Google Cloud Platform

To create a VM instance, you have to register on the Google cloud platform, and once you registered, you will get a 300$ free trial. I won’t include the registration part here as it is very easy.

1 External IP addresses
Navigate to “VPC Network – External IP addresses” and apply for a new static IP and name it as you want
The result will look like this, in this case, i named it to taiwan as i choose from asia areas:

2 Firewall rules
Navigate to “VPC Network – Firewall rule” and add a firewall rule like this:

3 Apply an API to use GPUs
You have to choose a right area as some areas do not provide GPU usage and the price could be various. In this case, we choose “asia-east1-a” and decide to use its Tesla P100
Navigate to “IAM & admin – Quotas” and select the API you want to apply, you will receive an email from Google, then the follow the instructions to use the GPU you want (usually, just click the link provided in the email).

4 Create an instance
Navigate to “Compute Engine – VM instances” and create an vm instance.
In order to the use GPU we applied, you have to choose the same area.
Hit the “Customize” button and customize your machine type, then expand the GPU section to use a P100.
For the operating system, just choose Ubuntu 16, you can also use an SSD or expand the boot disk size to 20 GB if you like.
For the Firewall section, just tick both the HTTP and HTTPS traffic.
You may also have to expand the next section and configure your network interface to use static IP (optional).
Do not be afraid of the price as Google will only charge you from the 300$ when you are running the device and it is charged by minutes.

5 CUDA® Toolkit 8.0.
Once you have created the instance, click SSH button to open an SSH console and follow the following commands.

sudo apt-get update
sudo curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda-8-0 -y

6 Jupyter Notebook

sudo apt-get install ipython python3-pip
sudo pip3 install --upgrade pip
sudo pip3 install jupyter
# Start your jupyter notebook
sudo jupyter notebook --ip 0.0.0.0 --port 8888 --allow-root

Copy the link provided by jupyter and replace the IP “0.0.0.0” to your VM instance’s and copy it your browser, and you can now get access to your Jupyter Notebook.

7 cuDNN v6 for CUDA 8.0
We have to use the Jupyter Notebook to upload our installation package first. To do this, you can click this link and download one. Remeber, you have to create a NVIDIA account if do not have one. Then, agree terms and choose the following one to download, which is the “cuDNN v6.0 Library for Linux”.

# The file name could be different, be careful.
tar -xzvf cudnn-8.0-linux-x64-v6.0.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
# Edit .bashrc
nano ~/.bashrc
# Add the following two lines to the file
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
# Press Ctrl+O to save changes and Ctrl+X to exit the editor
# Update changes
source ~/.bashrc

8 Tensorflow

sudo pip3 install tensorflow-gpu

Now you can have fun with your VM instance.
To save your 300$, do not to forget to shutdown your VM instance after using it.

[Tricks] Enable immersive mode with ADB command

//Turn on immersive mode (hide both status and navigation bars)
adb shell settings put global policy_control immersive.full=*
//Hide the navigation bar only
adb shell settings put global policy_control immersive.navigation=*
//These commands could be applied to specific apps, just replace the "*" with package names
//For example, if we want to immersive the Chrome and the Maps, just use the following command
adb shell settings put global policy_control immersive.full=com.android.chrome,com.google.android.apps.maps
//Revert to the standard mode
adb shell settings put global policy_control null

[PSV] VPKManager 0.42 is released!

It is a tool that can help to manager your .vpk files, enjoy!
2016/09/27: Be sure that you are using the right database because the English database and Chinese one are sepsrate.
2016/09/27: The new built version requires you guys to join the world for sharing game infos and savedata. Hence, I provide a temporary admin account which will allow you to modify the online database. Furthermore, if you are willing to do this, pls email me (hzxswxm@gmail.com, it is better to sent me some screenshots for the games you have to prove yourself), then i can share you the real admin account (the long lasting one)!

Version 0.42 (2016/09/26)
1. Fixed the bug that some mini install package cannot install correctly
2. Other improvements (code)

Version 0.41
1. Fixed a bug when calculating the checksum for DLC
2. Fixed a bug when uploading savedata (disable choosing file function when uploading)
3. Fixed a bug for the searchBox (disable when syn)

Version 0.40
1. Added support for Syn with Cloud!
2. Added support for Sharing & Downloading Savedata directly!
3. Added support for more game detials
4. Added support for searching games
5. Added support for choosing language
6. Added support for renameing *.lnk files
7. Added support for remebering the size of windows
8. Fixed some translation bugs
9. Fixed the notification when chooing game path
10. Fixed some bugs when renaming files
11. Lots of improvements
Notice: I have limited the online syn frequency to once per week if you are not using an admin account. The purpose is to protect the weak server. However, thare are alternative ways to force to do online syn, such as delete the native database (VPKManager.en-US.xml or VPKManger.zh-CN.xml).
MOST IMPORTANT: DO NOT keep doing online syn by this trick on purpose!

Version 0.32
1. Added savedate id to ‘Comment’ (Thank donghui2199)
2. Fixed a translantion bug

Version 0.31
1. Fixed a important bug for extracting games
2. Fixed some translantion and other things

Version 0.30
1. Fixed Chinese support
2. Support extracting files with updates or fullgames
3. Fixed several bugs

Version 0.21
1. Fixed a bug of renaming files

Version 0.2
1. Extract games to PSP savedata folder
2. Delete and rename games
3. Lots of improves

Version: 0.1
Features:
1. View .vpk and .zip files
2. Open files and file locations.

Prototypes:
Capture

Capture1

 

Download: VPKManger.zip

[Theme] TouHou Project / 東方Project

Version: 1.10
Updated: 07/10/2015
Description: include all system icons, 10 background pics and BGM.
Changelog:
  Ver 1.01: notifyBgColor fixed (04/10/2015).
  Ver 1.10: Added BGM (绯色月下、狂咲丿绝)!! Thx for ordi the Tutorial. (07/10/2015)

 

2015-10-03-005339 2015-10-03-005341 2015-10-03-005344 2015-10-03-005346 2015-10-03-005350 2015-10-03-005353 2015-10-03-005356 2015-10-03-005358 2015-10-03-005400

 

Download: PCSF00688-TOUHOUPROJECT000_Ver_1.10.zip

Reference: 

http://www.pixiv.net/member_illust.php?id=230943&type=all&p=6